implemented all functions in gridfunction