fixed bug, some of Barnetts method has been added, code organizes bad grid points