moved output logic to view helper test-drivenly