Updated controller and unit test