moved animation to make animate work