implement YAML marshaling