refactoring - getting towards object oriented programming