implement hook contexts