Update code to move up and down