more progress with implementing fitting of model params.
fitting to sphere model implemented, needs to be debugged.