global animate method