Added some UDFs