finish some useful code, like mutex, rpc...