fixed minor controller refactoring