Changed getNames signature from set to list