update for database