Partial #24 added return value to addcustomparameters