changed this to check type of each member in the list