implementing OOP