add p2 and jlex mode