slight refactoring of controller states