new hook api
should have been part of previous commit