Updated the inventory() function and started a funtion to merge database conflicted copies merge().