modified class controller to abstract controller