Solution to singleton_method