Update hook definition from my first attempt