dz3-dz4 refactoring