use register hooks callbacks