simplifying the parameter handling to support any number of parameters