commit before refacto algorithms