refactoring. collectInfo func improoved