replace direction with speed