html: avoid using map / reduce