paste in code for grid and NSEW directions