refactored some animation methods, moved to helper class