make animation connect smoothly