I understand. But why name it $allowed, if it has no control in prompt?
It is list of "alreadySetItems" or "itemList". Also line 109 has no meaning.