add threaded scheduler