Added draw grid function