made the classes more OOP