``` var slots_num = 0; var direction; slots_num = previous_pocket - next_pocket; if ( slots_num > 6){ slots_num -= 12; } if ( slots_num < -6){ slots_num += 12; } if (slots_num > 0){ direction = "CCW" } else if(slots_num < 0){ slots_num = slots_num * -1 direction = "CW" } atc.duration = slots_num * 1000