Added patterns for user defined function.