begin hooks