correctly implement animation