fixed retarded stuff in loop count