changed x_end jhead