STABLE VERSION. just need to change the condense function