added handlers for up and down buttons