C: Added Nelder Mead