rewriting jstest based joyGetPosEx