simplify homocount iteration