factory which was built by main.cpp