attributed TODO, streamlined loop as per code-review