changed the updateList method to remove the empty class