refactored to use controller base class