[add] support for functions in %opts