utils function got grid