move animation to lib