Added End criteria