this is the first part of the design patterns exercise