factory first aproach