add tag to CoreData
fix some bugs