working on grid implementaiton