refactor calendar callbacks