somehow, some of these changes got reverted, i think with Hasan's updates. Adding them back....