fix some refactorings