I think you need to check the length of beverages before you grab it from the array, or it will crash, no?