needed npfunc2 to spdmax