implement directions up and down