refactord calendar