added direction correctly