removed accidental infinite loop and removed commented out code