exposed loop logic