Expand on hook definition from initial attempt