changing function controller
some changes