modified teleoperation function