scheduler finally working