Boil the beans after soaking them over night, with cloves of garlic, onion and green chillies.
Once boiled soft, add sugar and salt, discard the garlic, onion and green chillies. Simmer for 10 minutes.
Now heat oil, add the chopped onions until golden, and then add the beans. Smash them to the side of the pan.
Heat oil in a heavy pan. Fry onion quarters till they are black and discard them. They have now flavoured the oil.
Now add the cooked beans and fry over again.