book to array method