use yaml instead of marshal for serialization