CCMBridge ported from java