Added rpc definition and implementation.