finished condense up

put in working code for the framework for the condense up function