refacto test