improved legibility

the loop now is broken, so we can output html instead of echoing it