project from Sander for calculating CC