add duration for animation