implemented generateAll method for gridworld. it has some memory leaks