little refactoring and added some decorator logic, to be continued