refacto save