We have developed an iterative reconstruction algorithm for TOAST, based on a finite element method (FEM) forward model that is fast and very flexible. The algorithm can be used at present with either non-time-resolved and/or time-resolved data, and can reconstruct either (mu) a and/or (mu) s parameters. An equivalent version can be formulated in terms of phase shift and modulation frequency. The basis of the algorithm is to attempt to find the minimum error norm between the measured data and the forward model acting on the trial solution, by a `classical' non-linear search in the distribution of the (mu) a and (mu) s parameters. In principle any search strategy could be used, but the advantage of our approach is that it employs analytical results for the gradient change (partial)M/(partial)(mu) , where M is the measurement. A number of factors influence the performance of the algorithm -- sampling density of the data and solution, noise in the data, accuracy of the model, and appropriate usage of a priori information. It appears that the presence of local minima of the error norm surface cannot be ignored. This paper presents an analysis of the performance of the algorithm on data generated from the FEM model, and from an independent Monte-Carlo model.