complete the getAllBook function