change loop conditions