added rpc hook