Added sorting to the void print function for my singleton class