implementing checkZdims