-add 3 hook functions.