allow an array of elements to be passed to contructor