making some refacto