build hashmap for availability, bug exist