adapting factory to a Singelton.