removed grid function