refactoring controller class
using refactored controller class