refactoring to handle multiple cookbooks