updated input method to use the same grid as the display