oop, inheritance and capsulation