refactoring
refactor: extracted segmented data structure from availability logic