create bean factory