Wash and soak rice for 15 - 20 mins.
Heat a nonstick pan with ghee, add in the whole spices, sauté well for 2 mins. When the cumin starts spluttering, add in the ginger garlic paste and green chilies if using. Sauté well.
Then, add the chopped tomatoes, if you are using red chili powder, add at this stage, along with salt. Simmer and cover with a lid and cook till the tomatoes get really soft. It takes about 5 mins when you cook on high and keep stirring it.
Add the drained rice and sauté well so that the rice is well coated. Then, add water. Adjust salt, cover with the lid and cook on high flame, until the water starts boiling.
Then, simmer and cook it covered with a lid for 10 mins. In between, stir it once but take care not to break the rice.
Normally, after the first boil, it takes about 5 mins to get cooked. But, to get the right texture, you can switch off and let the rice rest for a while over the stove.