moved books logic from the router to the books module