altered the controller and index view for improved search code