add bound function and game over logic