added Cccall to speed up optimisation