reverse while loop looks better