add tagitemmodel and some corrections
restore tags from db