Pass multiple parameters to function one being an array another being a variable with spaces