abandoned levmar in favour of scipy optimize