just changed generateClosedCurve method to BezeirPath, because that's what it returns, and some small edits