Changed the zAdjust method