add animation and new curve algorithm