adding local hooks