the original codes cannot be removed, only allow for the new codes to be deleted
separate the counting of total number of items from rendering the results
added the recovery mechanism so if server crashes, it is still able to recover the data that has been coded