open / closed objects -> refactoring to classes