add the proto and func