pass in hook as the last arg, implmentation detail