Note that it's not obvious what m, tr, z are. The function makes it more clear in its args but left as is for now.