handle return parameters correctly in optimizing()
Merge pull request #7 from dougalsutherland/optimize-pars

handle return parameters correctly in optimizing()