edited controller and view