finish unavailable ranges calculation