c example for hooks completed