updates with z axis checking