This time I used a slightly different method to generate the curve. I think it's a bit more efficient