Added ability to appropriately update database