implementing events
(unsuccessfully) working on displaying grid