rpc3+refactoring