create a session factory to replace base dao