insert hooks into db