make a hierarchy of handlers