initialize scheduler in different place