change tags from list to dict