implemented basic functionality of calendar