A compound of formula II: or a pharmaceutically acceptable salt thereof, wherein: A is selected from an optionally substituted phenyl ring or an optionally substituted pyridyl ring; and Ar is phenyl, a 5-6 membered monocyclic heteroaryl ring having 1-3 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or an 8-10 membered bicyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, wherein A and Ar are optionally and independently substituted with one or more R 1 substituents; each R 1 is independently selected from the group of halogen (F, Cl, Br, I), -NO 2, -CN, -N 3, or -L 1 -R; R is optionally substituted C 1-8 alkyl, C 2-8 alkenyl, C 2-8 alkynyl, haloalkyl, phenyl, a 3-7 membered saturated or partially unsaturated cycloalkyl ring, an 8-10 membered bicyclic saturated, partially unsaturated or aryl carbocyclic ring, a 4-7-membered saturated or partially unsaturated heterocycloalkyl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; a 5-6 membered monocyclic heteroaryl ring having 1-3 heteroatoms independently selected from nitrogen, oxygen, or sulfur; or an 8-10 membered bicyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; L 1 is a covalent bond or an optionally substituted bivalent C 1-6 hydrocarbon chain, wherein one or more methylene units of L 1 is optionally and independently replaced by -Cy-, -O-, -S-, -N(R a)-, -C -, -C -, -C N(R a)-, -N(R a)C N(R a), -N(R a)C -, -N(R a)C O-, -OC N(R a)-, -S -, -S 2 -, -S 2 N(R a)-, -N(R a)S 2 -, -OC -, or -C O-; -Cy- is an optionally substituted bivalent ring selected from a 3-7 membered saturated or partially unsaturated cycloalkylene ring, a 4-7-membered saturated or partially unsaturated heterocycloalkylene ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, phenylene, a 5-6 membered monocyclic heteroarylene having 1-3 heteroatoms independently selected from nitrogen, oxygen, or sulfur, an 8-10 membered bicyclic arylene, or an 8-10 membered bicyclic heteroarylene having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each R a is independently for each occurrence -H, -R or -C R; and each R' and R" is -H. A is selected from an optionally substituted phenyl ring or an optionally substituted pyridyl ring; and Ar is phenyl, a 5-6 membered monocyclic heteroaryl ring having 1-3 heteroatoms independently selected from nitrogen, oxygen, or sulfur, or an 8-10 membered bicyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, wherein A and Ar are optionally and independently substituted with one or more R 1 substituents; each R 1 is independently selected from the group of halogen (F, Cl, Br, I), -NO 2, -CN, -N 3, or -L 1 -R; R is optionally substituted C 1-8 alkyl, C 2-8 alkenyl, C 2-8 alkynyl, haloalkyl, phenyl, a 3-7 membered saturated or partially unsaturated cycloalkyl ring, an 8-10 membered bicyclic saturated, partially unsaturated or aryl carbocyclic ring, a 4-7-membered saturated or partially unsaturated heterocycloalkyl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; a 5-6 membered monocyclic heteroaryl ring having 1-3 heteroatoms independently selected from nitrogen, oxygen, or sulfur; or an 8-10 membered bicyclic heteroaryl ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; L 1 is a covalent bond or an optionally substituted bivalent C 1-6 hydrocarbon chain, wherein one or more methylene units of L 1 is optionally and independently replaced by -Cy-, -O-, -S-, -N(R a)-, -C -, -C -, -C N(R a)-, -N(R a)C N(R a), -N(R a)C -, -N(R a)C O-, -OC N(R a)-, -S -, -S 2 -, -S 2 N(R a)-, -N(R a)S 2 -, -OC -, or -C O-; -Cy- is an optionally substituted bivalent ring selected from a 3-7 membered saturated or partially unsaturated cycloalkylene ring, a 4-7-membered saturated or partially unsaturated heterocycloalkylene ring having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur, phenylene, a 5-6 membered monocyclic heteroarylene having 1-3 heteroatoms independently selected from nitrogen, oxygen, or sulfur, an 8-10 membered bicyclic arylene, or an 8-10 membered bicyclic heteroarylene having 1-4 heteroatoms independently selected from nitrogen, oxygen, or sulfur; each R a is independently for each occurrence -H, -R or -C R; and each R' and R" is -H.