added RandomAccessor class to replace direct Random instantiation