unnecessary dependencies removed, little refactoring