simplify writing metadata