A compound of formula or formula: or a pharmaceutically acceptable salt thereof, wherein: R 1 is hydrogen, C 1 -C 4 alkyl or C 1 -C 4 acyl; L is -(CH 2) s -CR 2 R 3 -(CH 2) m -; R 2 and R 3 are each independently hydrogen, C 1 -C 4 alkyl, -OR 4 or aralkyl; each R 4 is independently hydrogen or C 1 -C 4 alkyl; X is -W-R 5 or Y-R 6; W is -NR 4 - or -O-; Y is -C -, -S-, -SO-, -SO 2 -, -NR 4 SO 2 -, -SO 2 NR 4 - or -NR 4 C -; R 5 is acyl, C 1 -C 4 alkyl, cycloalkyl, heterocyclyl, aryl or heteroaryl, wherein each of said cycloalkyl, heterocyclyl, aryl or heteroaryl is optionally independently substituted with one or more R 8; R 6 is C 1 -C 6 alkyl, aryl, -NR 4 R 7 or heterocyclyl optionally independently substituted on one or more carbon atoms with C 1 -C 6 alkyl, halogen, cyano, or haloalkyl or optionally independently substituted on one or more nitrogen atoms with -C C 1 -C 6 alkyl, -C OC 1 -C 6 alkyl, -C NR 4 C 1 -C 6 alkyl, or -S 2 NR 4 C 1 -C 6 alkyl; R 7 is hydroxyl, alkoxy, -SO 2 C 1 -C 6 alkyl, -SO 2 cycloalkyl, or -SO 2 aryl, wherein the cycloalkyl or aryl of each of the -SO 2 cycloalkyl and -SO 2 aryl is optionally independently substituted with one or more R 8; each R 8 is halogen, hydroxyl, amino, cyano, C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, haloalkyl, alkoxy, alkylamino, dialkylamino, cycloalkyl, aryl, heteroaryl, heterocyclyl, aralkyl, heteroarylalkyl, -(CH 2) n COOR 4, -(CH 2) n C NR 4 OC 1 -C 6 alkyl; -(CH 2) n C NR 4 SO 2 C 1 -C 6 alkyl, -(CH 2) n C NR 4 SO 2 cycloalkyl, -(CH 2) n C NR 4 SO 2 aryl, -C 2 -C 6 alkenylC OR 4, -C 2 -C 6 alkenylC NR 4 SO 2 C 1 -C 4 alkyl, or -C 2 -C 6 alkenylC NR 4 SO 2 aryl, wherein each of the cycloalkyl, aryl, heteroaryl, heterocyclyl is optionally independently substituted with one or more C 1 -C 3 alkyl or -CH 2 NR 4 SO 2 aryl; m is 0 or 1; s is 0 or 1; each n is 0, 1, or 2; each p is 0, 1 or 2; each R A group is independently oxo or C 1 -C 3 alkyl, or two R A groups on different ring atoms together form a C 1 -C 3 bridge in which one of the bridge carbons is optionally replaced with -NH-; and each Q 1, Q 2 and Q 3 is independently hydrogen, halogen, haloalkyl, C 1 -C 4 -alkyl, or C 1 -C 4 -alkoxy. R 1 is hydrogen, C 1 -C 4 alkyl or C 1 -C 4 acyl; L is -(CH 2) s -CR 2 R 3 -(CH 2) m -; R 2 and R 3 are each independently hydrogen, C 1 -C 4 alkyl, -OR 4 or aralkyl; each R 4 is independently hydrogen or C 1 -C 4 alkyl; X is -W-R 5 or Y-R 6; W is -NR 4 - or -O-; Y is -C -, -S-, -SO-, -SO 2 -, -NR 4 SO 2 -, -SO 2 NR 4 - or -NR 4 C -; R 5 is acyl, C 1 -C 4 alkyl, cycloalkyl, heterocyclyl, aryl or heteroaryl, wherein each of said cycloalkyl, heterocyclyl, aryl or heteroaryl is optionally independently substituted with one or more R 8; R 6 is C 1 -C 6 alkyl, aryl, -NR 4 R 7 or heterocyclyl optionally independently substituted on one or more carbon atoms with C 1 -C 6 alkyl, halogen, cyano, or haloalkyl or optionally independently substituted on one or more nitrogen atoms with -C C 1 -C 6 alkyl, -C OC 1 -C 6 alkyl, -C NR 4 C 1 -C 6 alkyl, or -S 2 NR 4 C 1 -C 6 alkyl; R 7 is hydroxyl, alkoxy, -SO 2 C 1 -C 6 alkyl, -SO 2 cycloalkyl, or -SO 2 aryl, wherein the cycloalkyl or aryl of each of the -SO 2 cycloalkyl and -SO 2 aryl is optionally independently substituted with one or more R 8; each R 8 is halogen, hydroxyl, amino, cyano, C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, haloalkyl, alkoxy, alkylamino, dialkylamino, cycloalkyl, aryl, heteroaryl, heterocyclyl, aralkyl, heteroarylalkyl, -(CH 2) n COOR 4, -(CH 2) n C NR 4 OC 1 -C 6 alkyl; -(CH 2) n C NR 4 SO 2 C 1 -C 6 alkyl, -(CH 2) n C NR 4 SO 2 cycloalkyl, -(CH 2) n C NR 4 SO 2 aryl, -C 2 -C 6 alkenylC OR 4, -C 2 -C 6 alkenylC NR 4 SO 2 C 1 -C 4 alkyl, or -C 2 -C 6 alkenylC NR 4 SO 2 aryl, wherein each of the cycloalkyl, aryl, heteroaryl, heterocyclyl is optionally independently substituted with one or more C 1 -C 3 alkyl or -CH 2 NR 4 SO 2 aryl; m is 0 or 1; s is 0 or 1; each n is 0, 1, or 2; each p is 0, 1 or 2; each R A group is independently oxo or C 1 -C 3 alkyl, or two R A groups on different ring atoms together form a C 1 -C 3 bridge in which one of the bridge carbons is optionally replaced with -NH-; and each Q 1, Q 2 and Q 3 is independently hydrogen, halogen, haloalkyl, C 1 -C 4 -alkyl, or C 1 -C 4 -alkoxy.