Add event and optimize calendar