cleaning up factory