changed tickHook approach