singleton pattern examples, good vs bad