before refacto