simplify, integrate 'nds' library