Modified the interaction loop in order to support auto completion