improve factory