implement new loop pattern