added coding samples for singletons