modified class hierarchy