working x1 and x2 for small dataset