pass instance to hooks