Heat oil or ghee in a pan and add cinnamon, cardamom, cloves and blackpepper. When they splutter add turmeric, curry leaves, green chillies and onions, fry them till golden brown and add ginger and garlic paste. Fry for 3 to 4 minutes, remove from heat and add it to rice and moongdal, add salt and cook it.