hook initialization