updating for database