moved tag-specific stuff from main controller to a separate controller