clean up factory, now factory only get data and controller handle all the logics