grid point constraint added and commit before major change to the code