refactor adding tags