add if statement to handle when company.books are empty