some refacturing.