44591773: factor logic into single loop
44591773: render partial
44591773: refactor before block