Changed logic in books_controller