updated with session data in rpc functions