compute availabilities