updated param function to allow array of params and default setting where regex is null