Implementation of next command for absolute target; needs refactoring.