Modified jit function