adds grid functionality