finished refactoring packstack cookbook