improvements to paramater creation for functions