drawGrid Function