moved output and analysis from core algorithm to interact wrapper