First hook implementation