Upper curve fully working