do some little refactorings