refactoring tags-controller