few updates, little refactoring