I\'m trying to combine two functions into a single function but I\'m having more difficulty than I expected. I have included the two separate functions and the version wher