Hard-coding key constants, like the number of parameters, is maybe not such a good idea. What about making it a parameter that is supplied to the function. It could default to 12...