Added grid functionality