Changed the function definitions to take arrays instead of a variable number of inputs.