better composition with loops and organization in the patch