Adding a getNames method to the di