compare while and for