a little more scheduling logic preparation
added jshint