added updateDatabase