added direction control