SDM example with a function object