wrapped up setinel loop