refactor for book search module