updated freebusy algorithm