How to Use User Defined Functions (UDF)