ported to support jpm