refactor using FACTORIES