added direction for x