two ways of writing singleton