Here we continues
Another translation of the Ekottara Āgama about Nanda, but this time he’s not the main character, only mentioned. But EA 35.9 is still a very significant sutra in many ways, both historical as well as doctrinal, to explain them in details could cost no less than a few A4 pages, so I won’t do that here. This sutra has a parallel in SN 8.4, but the content is very different (They are likely to have come from an earlier, longer, and more complete sutra, I have some strong evidence for this)
But back to the main point, the sutra tells the story of Venerable Vangisa’s struggle against his own sexual desire, and Venerable Ananda then used Nanda as an example for Vangisa to follow, and it worked, it subsided his mind, and he then went on to attain a significant milestone on the Path. One extremely important thing about this sutra is that it describes the mental progress of someone who’s on the verge of attainting to a Path’s moment, possibly Anagami—or non-returner, and how extremely similar it is to modern Thai Forest Master Ajaan Maha Boowa’s recounts of his own experience (See Notes). And yet he told that one couldn’t find them in the suttas, but here they are in the Āgama, though not recorded in the Pali Canon. Aware of its significance, I have carefully translated that particular passage, but mistakes should be expected, so if you encounter some, please do tell me, it will be much appreciated.
Thus have I heard.
Once when the Buddha was staying in Rājagṛha in the Bamboo Park of Karaṇḍa, with a large assembly of 500 Bhikṣus.
At that time, Ānanda and Vaṅgīsa, when it was time, put on their robes and carried the bowls, entered the city for alms. Then Vaṅgīsa, when he was on a narrow street, saw an extremely beautiful woman, her beauty was one of a kind. Having seen her, his thoughts and mind went out of control, and cannot be kept at normalcy. Then Vaṅgīsa at that moment, used this verse to address Ānanda:
“The fire of desire is blazing within me,
My heart and mind is burning utmostly.
Say the meaning to extinguish it, I beseech thee,
So may many benefits could be poured upon me.”
Having heard him, Ānanda then used this stanza to reply:
“Perverted dharma, know that it is this desire,
Your heart and mind is burning with an utmost fire,
You should so expel that imagining thought,
The lustful mind will then come to naught.”
Then Vaṅgīsa again used this stanza to reply:
“The origin of forms is the mind,
The source of that condition is the eyes,
You can see its supports when sleeping,
Those forms are like tangled weeds withering.”
At that moment, Venerable Ānanda then came forward, with his right hand touched Vaṅgīsa’s head and said this verse:
“Invoke the Buddha, who has no sensual passion,
Look towards Nanda, who has crossed over that passion.
See that heaven, always with hell is present,
So restrain your intention, away with the five destinations.”
Then Vaṅgīsa after hearing these words from Venerable Ānanda, said:
“Stop! Stop! Ānanda! Let us finish collecting alms and return to the Lord.”
At that time, that woman from afar saw Vaṅgīsa and smiled. Then Vaṅgīsa when seeing that woman from afar smiling, immediately he gave rise to these thoughts:
“Now this lady, with her body is established on bones, wrapped up in skin, just like a painted vase with its inside full of impurities. Furthermore, this body is what deceives the common people of the world, and gives rise to distorted perceptions.”
Then, Venerable Vaṅgīsa investigated that woman from the head on down to the feet: “Is there anything in this body that worths craving for? These thirty-six parts all are impure. And those things, now, where do they come from?”
Then Venerable Vaṅgīsa thought further: "Now I investigate other people’s body, but it’s not as good as if I investigate my own. This desire, where does it come from? Does it come from the earth element? Or does it come from the water, fire, or the wind element? If it comes from the earth element, the earth element is solid, cannot be damaged. If it comes from the water element, the water element is fluid, cannot be grabbed hold. If it comes from the fire element, the fire element cannot be captured. If it comes from the wind element, the wind element is invisible, cannot be caught hold. "
Then the thought occured to the Venerable: “This desire, it arises from perception! [Skt: sajjñā; Pali: saññā]” 
At that moment, Venerable Vaṅgīsa uttered this verse:
“Desire, I have known thy origin,
Thou arisest only from perception. 
If I do not conceive thee,
Thou wilt not have come to be.”
When Venerable Vaṅgīsa spoke this verse, he also reflected on the perception of impurity, and right at that moment his mind attained release from the effluent of becoming.
Then Ānanda and Vaṅgīsa left the city of Rājagṛha and went to the Lord, paid homage at his feet, and sat to one side, Vaṅgīsa said to the Lord:
“Lord, I have now gained some good benefits, for I have realized parts of the teaching”
The Lord asked:
“Now, how have you self-realized?”
Vaṅgīsa told the Buddha:
“Form is unstable and unfirm, cannot be manifest, delusive, illusory and unreal. Feeling is unstable and unfirm, just like bubbles in water, delusive, illusory and unreal. Perception is unstable and unfirm, just like a mirage , delusive, illusory and unreal. Formations are unstable and unfirm, just like a banana trunk, delusive, illusory and unreal. Consciousness is unstable and unfirm, delusive, illusory and unreal.”
And he said furthermore to the Buddha:
“All these five clinging-aggregates are unstable and unfirm, delusive, illusory and unreal.”
Then Venerable Vaṅgīsa spoke these stanzas:
“Form is like a lump of foam,
Feeling, like bubbles in water;
Perception is like a mirage
Formations, a trunk of banana,
And consciousness, illusory dharma.
Thus it was said by the Most Victorious One.”
“Having done pondering this,
Investigate formations to the utmost;
All are empty and still,
Nothing is true or real,
All came from this body alone.
This has been said by the Sūgata.”
“One should eliminate the three dharmas,
See that forms are unattractive and impure;
This body is always like that,
Delusive, illusory and unreal;
It is called the harmful dharma.
And the five aggregates are unstable,
Having realized that they are not real,
The beyond of any traces, one now returns.”
“Thus, Lord, is what I have now realized.”
The Lord then said:
“Excellent! Vaṅgīsa! You have skillfully investigated the root of these five clinging-aggregates. Now you should know, one who is a practitioner should investigate these five clinging-aggregates to see that they are all uncertain and unsure. Why is that? For when I investigated these five clinging-aggregates under the Bodhi tree and attained to the Unsurpassed Right Self-Awakening, it was just like what you have done today.”
At that moment, after the Lord concluded this Dharma discourse, there were sixty Bhikṣus right on their seats attained to the end of the effluents, with their minds released.
Then Venerable Vaṅgīsa, after hearing what the Buddha taught, delighted and approved.
 According to 佛光電子大辭典, 思想 is the old translation of Sanskrit’s sajjñā (saññā in Pāli). I therefore translated accordingly to the modern English’s translation of the term.
 This passage is very similar to the experience described by Thai Forest Meditation Master Ajaan Maha Boowa:
 野馬 besides meaning a wild horse, it has another meaning that is equivalent to English’s mirage (it describes a phenomenon of water vapour evaporates under the sun that results in hallucination)