s coordinate working for all orientations