add hooks method in model