Started adding functions for cbc