only access database for tags once