add tag modification logic, still missing a lot.