refactor schedule.js
merge