add callbak function to register method