Improve factory