define pre/post hooks on self