Added isAvailable function