Ending Condition Added