inside simplex function fix prototype
init grid function