update nio example