Fixed samplerecords to do randomwalks and made smplerecord an rpc