adapts to the changes in HostContext