edited grid functions