clear hook code