working on handling key press events