if you Indonesian or Malay People click link below to download the tutorial
tameni download
tameni can use to obtain a purpose, the purpose usually have caused relation, like correlation using "for"
for example
for become number one in class i studying Japanese well
kurasu de ichiban naru tameni, nihongo wo yoku benkyousuru.
クラス で 一番なるために、日本語 を 良く 勉強する。
always remember that before TAME (NI) is V.ru or dictionary form, if you using verb before tameni, some times particles no also use when using Noun before TAME (ni)
hope this simple explanation is use full