add rand chars instead of rand ints, add drain for rpcserver