testing scipy optimizer