Z fix
in a separate function