change the starting and finishing criterion