replace advice with hook