improve class controller