Added hook functions