updated to use enumerate object, added docblocks, added parent widget argument to add options directly to parent widget