added toArray method for NodeLists to get a true array