Adding math functions to add and multiply an array passed in to the query paramaters