some refacto