added parametrized metric serialization and fixed file history