added assertion, renamed nds -> nio