This invention provides compounds of the formula: wherein: A, B and D are N or CH, with the proviso that A, B and D can not all be CH; R1and R2are independent substituents selected from H, CORA, NRBCORA, or optionally substituted alkyl, alkenyl, alkynyl, cycloalkyl, aryl, or groups; or R1and R2are fused to form an optionally substituted 3 to 8 membered spirocyclic or heterocyclic ring; RAis H or optionally substituted alkyl, aryl, alkoxy, or aminoalkyl; RBis H, C1to C3alkyl, or substituted C1to C3alkyl; R3is H, OH, NH2, or optionally substituted alkyl, or alkenyl, or CORC; RCis H or optionally substituted alkyl, aryl, alkoxy, or aminoalkyl; R4is a substituted benzene ring or a five or six membered ring with 1, 2, or 3 heteroatoms from the group including O, S, SO, SO2or NR5; RFis H or optionally substituted alkyl, aryl, alkoxy, or aminoalkyl; RGis H, alkyl, or substituted alkyl; R5is H or alkyl; Q is O, S, NR6, or CR7R8; R6is CN, SO2CF3, or optionally substituted alkyl, cycloalkyl, aryl, or heterocyclic ring; R7and R8are H, NO2, CN CO2R9, or optionally substituted alkyl, cycloalkyl, aryl, or heterocyclic; R9is C1to C3alkyl; or CR7R8form a six membered ring of the structure below: W is O or a chemical bond; or a pharmaceutically acceptable salt thereof, as well as their use and pharmaceutical compositions as agonists and antagonists of the progesterone receptor.