added updateDatabase()