grid functionality across devices