insert throw if cannot openning contexts
update input API