replace global initializer with singleton