refactor to manage tetris events