refactored to inner classes
tried out static and non-static initialization block