got all the special cases correct now

needed some changes for the grids with less points