logic for weight and rep input to work with cancel button