my solution for cookbookv1