changed calculation for random read/write