added fmincon test code and related edits