update to db and template 2