added index to the libraries controller and made rspec rendering for json " not passing"