conditional motor direction based on data