updated reading rand file