Added new API of scheduler (relates to #35)