changed the nameslist into a set