started rewriting calendar.js