refactoring out consume() methods into util helper package