implements Hook and Transaction