controller and its test updated