working on loopselector