Added switch for the Y co-ordinates.