I don't think this will work as I intend it to. Need to run through the array and remove an element with the appropriate attribute