Some considerations when using UDFs