now calculation xvals and yvals properly