functions in Grid graphics