refine the protocol and amf0, extract the template method as global static method