understanding oop class