small adjustments to hooks and a better example