inplace z and cz