updated isAvailable method