update with taking db as input