added direction handling so we can accel in both dir