change loop method