Contuining work on writeToGrid