added Animation flip function