Rinse the rice in water 3-4 times, each time draining out the water and add fresh one.
Alternately, put the rice in a sieve or strainer. Rinse it under the tap water. Don't rub it too hard.
Add 2 cups of water to the rinsed rice. Allow the rice to soak for 20-30 minutes.
Heat oil in a saucepan over medium heat.
When it becomes hot, add the whole spices - bay leaf, green cardamom, black cardamom, cloves, cinnamon, peppercorns.
Add the sliced onion.
Cook the onion slices over low to medium heat till they caramelize.
Frequently stir the onion slices so that they don't get burnt on one side.
As soon as the onion turns light brown, keep an eye as it can quickly get burnt.
At this point add the split green chillis.
Continue to stir fry the onion slices.We need the onions to be golden brown.
Add the water in which you have soaked the rice.
Add salt and coriander powder.
Bring the water to a boil.
Add the rice and garam masala. Stir gently.
Cover the pan with a lid and allow the mixture to simmer for 15-20 minutes or until the rice is cooked.