paused working with loop.py added conditional