made it more OOP