added database updating
added database updating