public ActivityItemProperties addActivityItem(ActivityItem actItem) {
        
        // get the dimensions for the component
        Dimension activityItemDimens = new Dimension(actItem.getActivityItemDimensions().width, 
                actItem.getActivityItemDimensions().height) ;
        
        // calculate the location for the component
        Point greatestTracklocation = new Point(0, 0) ;
        
        for (int activityItemsCounter = 0 ; activityItemsCounter < activityProperties.size() ;
                activityItemsCounter ++) {
            
            // get the currActivity
            ActivityItem currItem = activityProperties
                    .get(activityItemsCounter).getActivityItem() ;
            
            // get its location
            Point currItemLocation = currItem.getTrackLocation() ;
            
            // stores whether or not there exists a component 
            // at the desired location for the component
            
            // find out if there is an overlapping component 
            // at that location and return false 
            // this checks if any of the left coordinates of
            // the left coords are within the item proposed
            // to be added
            // !+ (TRICKY SECTION :- CHANGE AT YOUR OWN PERIL !+
            if ((currItem.getTrackLocation().y >= actItem.getTrackLocation().y
                    && currItem.getTrackLocation().y <= (actItem.getTrackLocation().y 
                    + actItem.getActivityItemDimensions().height)) 
                    || ( (currItem.getTrackLocation().y + currItem.getActivityItemDimensions().height)
                        >= actItem.getTrackLocation().y
                        && (currItem.getTrackLocation().y + currItem.getActivityItemDimensions().height)
                        <= (actItem.getTrackLocation().y + actItem.getActivityItemDimensions().height)
                    )) {
                
                // do not allow the component to be added to this track
                return null ;
                
            } else {
                // increment the coordinates for the lowermost location 
                // for the component
                greatestTracklocation.x = currItemLocation.x ;
                greatestTracklocation.y = currItemLocation.y 
                        + currItem.getActivityItemDimensions().height ;
            }                        
        }
        
        // create the ActivityItemProperties object
        ActivityItemProperties acProperties  = new 
                ActivityItemProperties(actItem, activityItemDimens, 
                greatestTracklocation);
        
        // add it to the main container
        activityProperties.add(acProperties);    
        
        // return the activities item properties
        return acProperties ;
    }