simplify metadata construction