updates tags in the database