app pattern, loop emulate fix