updated test script; fixed bug with get_num_nodes