psuedo code for calendar idea