make animation smoothly