refactor to animation manager