flatten the src