minor refinements on the teleop function