fixed up module to iterate over new collections and structure