grid functions for new approach