Solved Endless loop