public List<Interval> insert(List<Interval> intervals, Interval newInterval) {
	    	List <Interval> mergedList = new ArrayList<Interval>();
	    	
	    	if (newInterval == null) return intervals;
	    	if ((intervals == null)	|| (intervals.isEmpty()))
	    	{
	    		mergedList.add(newInterval);
	    		return mergedList;
	    	}
	    	
	    	boolean insertFlag = false;
	        for ( Interval interval : intervals)
	        {
	        	if (isOverlap(interval, newInterval))
	        	{
	        		newInterval = mergeIntervals(interval, newInterval);
	        	}
	        	else
	        	{
	        		if ((insertFlag == false) && (newInterval.start < interval.start))
	        		{
	        			mergedList.add(newInterval);
	        			insertFlag = true;
	        		}
	        		mergedList.add(interval);
	        	}
	        }
	        if (insertFlag == false)
	        	mergedList.add(newInterval);
	        
	        return mergedList;
	    }