Rectangular grid is now working with all of the defined functions