protect against pad going out of the screen
refactor in the way