flatten structure