Add grid draw logic