Modified animation to Flags and duration