added 3 new functions for grid