A compound of formula (VIII), or a pharmaceutically acceptable salt or ester thereof; wherein: A and V independently are H, halo, azido, -CN, -CF 3, -CONR 1 R 2, -NR 1 R 2, -SR 2,-OR 2, -R 3, -W, -L-W, -W 0 or -L-N -W 0; each Q is independently halo, azido, -CN, -CF 3, -CONR 1 R 2, -NR 1 R 2, -SR 2, -OR 2,-R 3, -W, -L-W, -W 0, or -L-N -W 0; in each -NR 1 R 2, R 1 and R 2 together with N may form an optionally substituted azacyclic ring, optionally containing an additional heteroatom selected from N, O and S as a ring member; R 1 is H or C1-C6 alkyl, optionally substituted with one or more halogens, or =O; R 2 is H, or C1-C10 alkyl, C1-C10 heteroalkyl, C2-C10 alkenyl, or C2-C10 heteroalkenyl, each of which may be optionally substituted with one or more halogens, =O, or an optionally substituted 3-7 membered carbocyclic or heterocyclic ring; R 3 is an optionally substituted C1-C10 alkyl, C2-C10 alkenyl, C5-C10 aryl, or C6-C12 arylalkyl, or a heteroform of one of these, each of which may be optionally substituted with one or more halogens, =O, or an optionally substituted 3-6 membered carbocyclic or heterocyclic ring; R 4 is H, or C1-C6 alkyl; each R is independently H or C1-C6 alkyl; R 7 is H and R 8 is C1-C10 alkyl, C1-C10 heteroalkyl, C2-C10 alkenyl, or C2-C10 heteroalkenyl, each of which may be optionally substituted with one or more halogens, =O, or an optionally substituted 3-7 membered carbocyclic or heterocyclic ring; or in -NR 7 R 8, R 7 and R 8 together with N may form an optionally substituted azacyclic ring, optionally containing an additional heteroatom selected from N, O and S as a ring member; m is 0; n is 0; L is a C1-C10 alkylene, C1-C10 heteroalkylene, C2-C10 alkenylene or C2-C10 heteroalkenylene linker, each of which may be optionally substituted with one or more substituents selected from the group consisting of halogen, oxo (=O), or C1-C6 alkyl; W is an optionally substituted 4-7 membered azacyclic ring, optionally containing an additional heteroatom selected from N, O and S as a ring member; and W 0 is an optionally substituted 3-4 membered carbocyclic ring, or a C1-C6 alkyl group substituted with from 1 to 4 fluorine atoms. A and V independently are H, halo, azido, -CN, -CF 3, -CONR 1 R 2, -NR 1 R 2, -SR 2,-OR 2, -R 3, -W, -L-W, -W 0 or -L-N -W 0; each Q is independently halo, azido, -CN, -CF 3, -CONR 1 R 2, -NR 1 R 2, -SR 2, -OR 2,-R 3, -W, -L-W, -W 0, or -L-N -W 0; in each -NR 1 R 2, R 1 and R 2 together with N may form an optionally substituted azacyclic ring, optionally containing an additional heteroatom selected from N, O and S as a ring member; R 1 is H or C1-C6 alkyl, optionally substituted with one or more halogens, or =O; R 2 is H, or C1-C10 alkyl, C1-C10 heteroalkyl, C2-C10 alkenyl, or C2-C10 heteroalkenyl, each of which may be optionally substituted with one or more halogens, =O, or an optionally substituted 3-7 membered carbocyclic or heterocyclic ring; R 3 is an optionally substituted C1-C10 alkyl, C2-C10 alkenyl, C5-C10 aryl, or C6-C12 arylalkyl, or a heteroform of one of these, each of which may be optionally substituted with one or more halogens, =O, or an optionally substituted 3-6 membered carbocyclic or heterocyclic ring; R 4 is H, or C1-C6 alkyl; each R is independently H or C1-C6 alkyl; R 7 is H and R 8 is C1-C10 alkyl, C1-C10 heteroalkyl, C2-C10 alkenyl, or C2-C10 heteroalkenyl, each of which may be optionally substituted with one or more halogens, =O, or an optionally substituted 3-7 membered carbocyclic or heterocyclic ring; or in -NR 7 R 8, R 7 and R 8 together with N may form an optionally substituted azacyclic ring, optionally containing an additional heteroatom selected from N, O and S as a ring member; m is 0; n is 0; L is a C1-C10 alkylene, C1-C10 heteroalkylene, C2-C10 alkenylene or C2-C10 heteroalkenylene linker, each of which may be optionally substituted with one or more substituents selected from the group consisting of halogen, oxo (=O), or C1-C6 alkyl; W is an optionally substituted 4-7 membered azacyclic ring, optionally containing an additional heteroatom selected from N, O and S as a ring member; and W 0 is an optionally substituted 3-4 membered carbocyclic ring, or a C1-C6 alkyl group substituted with from 1 to 4 fluorine atoms.