Added db event hook