uncommitted changes from friday.  insignificant. just moved parts of segmanager update to other functions
fixed merge conflicts