fixed rpc functions to fit new structure