#fixed 550 change for to while

#550 for to while