compiled with new function CalFmn