Sonle older loop stuff I hadn't committed