applying more OOP