add query option parameter to hook functions, to get posibility to reuse things like transaction etc.