A compound of formula (I) or a pharmaceutically acceptable salt thereof, wherein: Each R1 is independently an optionally substituted C1-6 aliphatic, an optionally substituted aryl, an optionally substituted heteroaryl, an optionally substituted C3-10 membered cycloaliphatic or an optionally substituted 4 to 10 membered heterocycloaliphatic, carboxy, amido, amino, halo, or hydroxy, provided that at least one R1 is an optionally substituted aryl or an optionally substituted heteroaryl and said R1 is attached to the 3- or 4- position of the phenyl ring R2 is hydrogen, an optionally substituted C1-6 aliphatic, an optionally substituted C3-6 cycloaliphatic, an optionally substituted phenyl, or an optionally substituted heteroaryl Ring A is an optionally substituted cycloaliphatic or an optionally substituted heterocycloaliphatic where the atoms of ring A adjacent to C* are carbon atoms Each R4 is an optionally substituted aryl or an optionally substituted heteroaryl and n is 1, 2, 3, 4, or 5. Compounds of the present invention and pharmaceutically acceptable compositions thereof, are useful as modulators of ATP-Binding Cassette (ABC) transporters or fragments thereof, including Cystic Fibrosis Transmembrane Conductance Regulator (CFTR). The present invention also relates to methods of treating ABC transporter mediated diseases using compounds of the present invention.