Update the Method to call CheckZ just once