A compound of formula III-a: or a pharmaceutically acceptable salt thereof, wherein: W is oxygen or sulfur; R 1 is hydrogen or C 1-4 aliphatic, optionally substituted with one or more halogens, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 RN 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; R 2 is a 5-6 membered monocyclic heteroaromatic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; R 3 is -CN, -OR, -C N 2, -C OR, -SO 2 R, or an optionally substituted ring selected from phenyl or 5-6 membered heterocyclyl or heteroaryl having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of R 5 and R 5 ' is independently -R, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; or R 5 and R 5' are taken together to form a cyclopropylenyl, cyclobutylenyl, or oxetanyl group; and R 6 is -R, -C N 2, or -C R; each R 8 is independently selected from halogen, -R, -OR, -SR, -N 2 or deuterium; R z is selected from hydrogen, halogen, methyl, or -CN; each R is independently hydrogen, deuterium, or an optionally substituted group selected from C 1-6 aliphatic, a 3-8 membered saturated or partially unsaturated monocyclic carbocyclic ring, phenyl, an 8-10 membered bicyclic aromatic carbocyclic ring; a 4-8 membered saturated or partially unsaturated monocyclic heterocyclic ring having 1-2 heteroatoms independently selected from nitrogen, oxygen, or sulfur, a 5-6 membered monocyclic heteroaromatic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or an 8-10 membered bicyclic heteroaromatic ring having 1-5 heteroatoms independently selected from nitrogen, oxygen, or sulfur; and n is 0-5. W is oxygen or sulfur; R 1 is hydrogen or C 1-4 aliphatic, optionally substituted with one or more halogens, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 RN 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; R 2 is a 5-6 membered monocyclic heteroaromatic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; R 3 is -CN, -OR, -C N 2, -C OR, -SO 2 R, or an optionally substituted ring selected from phenyl or 5-6 membered heterocyclyl or heteroaryl having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each of R 5 and R 5 ' is independently -R, -OR, -SR, -N 2, -N C R, -C N 2, -N C N 2, -N C OR, -OC N 2, -N SO 2 R, -SO 2 N 2, -C R, -C OR, -OC R, -S R, or -SO 2 R; or R 5 and R 5' are taken together to form a cyclopropylenyl, cyclobutylenyl, or oxetanyl group; and R 6 is -R, -C N 2, or -C R; each R 8 is independently selected from halogen, -R, -OR, -SR, -N 2 or deuterium; R z is selected from hydrogen, halogen, methyl, or -CN; each R is independently hydrogen, deuterium, or an optionally substituted group selected from C 1-6 aliphatic, a 3-8 membered saturated or partially unsaturated monocyclic carbocyclic ring, phenyl, an 8-10 membered bicyclic aromatic carbocyclic ring; a 4-8 membered saturated or partially unsaturated monocyclic heterocyclic ring having 1-2 heteroatoms independently selected from nitrogen, oxygen, or sulfur, a 5-6 membered monocyclic heteroaromatic ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or an 8-10 membered bicyclic heteroaromatic ring having 1-5 heteroatoms independently selected from nitrogen, oxygen, or sulfur; and n is 0-5.