allow array of elements to be passed in