add custom function support