#154 improve scheduler