making input operator idempotent