minor changes to 3 functions in calendar.js