Added custom function support for CoD4