improve hook