Earlier writes were being calculated erroneously due to updation of old data for each write. Corrected that