modified incorrect comment
result reporting moved to an independent function