add popover and some calendar optimization