updating controller and index