removed debug error in for loop