some little refactorings