move the param string builder into it's own function