trying to fix looped run