implemented everything in calender but probably needs more testing