converted controller to 2.x