curves are implemented, finding a solution for envelope