almost done parrallelization bugs with gen_points nested for loops doesnt finsh the outter one except in special cases