support for n and p in addition to j and k