enabled foreach iteration for pattern