new curve; new errorI
small fixes
main
new algo
small fixes