added calculation of x 2