added direction and speed