[WIP]: extracting the collection (nested hashing) logic