refactor, more modular, no more this and prototype