works for N>1 again