Implement most of functions of Rpc