instead of 16, use sizeof(ns)/sizeof(ns[0])