major changes. making it OOP