J(x) computation added