Actually, $drive and $share are both required parameters of your udf... so really the first "if" is redundant... because kixtart will error out if you do not supply the proper parameters...