rewrite MethodInfo serialization