work and debug utils.flatten family