update condition of end reached