simplify metadata building