add bean factory