fix incorrect index from dfc6bdb65f100486623ac36643e9b99482281468
fix logic for when to clear results
remove printouts
add comment on seemingly redundant variable