animations and refactor