some little refactors