to refactory injectbase for thread and window