Private logic constructor, add ,sort by end date

and unit test for add