calling cc functions from js