refactoring factory and controllers - part3