added animation controller and removed control code from curve_animation