deep flatten