A compound of formula, or a pharmaceutically acceptable salt or ester thereof, wherein: B is an aryl or heteroaryl group, each of which is optionally substituted by one or more R 10 groups; X is selected from O, (CR 11 R 12) p and (CR 11 R 12) p CO; each R 1 is independently selected from Cl and SR 13; R 2 is selected from H, alkyl, cycloalkyl, heterocycloalkyl and COR 33, wherein said alkyl, cycloalkyl or heterocycloalkyl group is optionally substituted by one or more R 14 substituents; R 3 is selected from alkyl, cycloalkyl and heterocycloalkyl, each of which is optionally substituted with one or more R 15 substituents; or R 2 and R 3 are linked together with the nitrogen to which they are attached to form a saturated heterocyclic group optionally containing one or more additional heteroatoms selected from O, N and S and optionally further substituted by one or more R 16 groups; each R 4 and R 5 is independently selected from H, alkyl, (CH 2) t OR 24 and (CH 2) u NR 25 R 26; or one of R 4 and R 5 is H or alkyl and the other is linked to R 3 to form a saturated heterocyclic group; each R 6 and R 7 is independently selected from H, alkyl, (CH 2) v OR 27 and (CH 2) w NR 28 R 29; or one of R 6 and R 7 is H or alkyl and the other is linked to R 3 to form a saturated heterocyclic group; each R 8 and R 9 is independently selected from H, alkyl, (CH 2) x OR 30 and (CH 2) y NR 31 R 32; or one of R 8 and R 9 is H or alkyl and the other is linked to R 3 to form a saturated heterocyclic group; or one of R 8 or R 9 is linked to one of R 4 or R 5 to form a cyclic group; R 10 is selected from alkyl, OH, halogen, alkoxy, CO 2 -alkyl, COOH, CO-alkyl, NO 2 and CN; each R 14, R 15, R 16 and R 33 is independently selected from (CH 2) s -R 17, R 17 is selected from alkyl, NR 18 R 19, OR 20, SR 21, COR 22 and CO 2 R 23; R 11, R 12 and R 18 -R 32 are each independently selected from H and alkyl; R 13 is alkyl; m, q and r are each independently 0, 1 or 2; p is 0 or 1; such that the sum of m, p, q and r is 0, 1, 2, 3, 4 or 5, preferably 0, 1, 2, 3 or 4; and each of s, t, u, v, w, x, y is independently 0, 1, 2, 3 or 4. B is an aryl or heteroaryl group, each of which is optionally substituted by one or more R 10 groups; X is selected from O, (CR 11 R 12) p and (CR 11 R 12) p CO; each R 1 is independently selected from Cl and SR 13; R 2 is selected from H, alkyl, cycloalkyl, heterocycloalkyl and COR 33, wherein said alkyl, cycloalkyl or heterocycloalkyl group is optionally substituted by one or more R 14 substituents; R 3 is selected from alkyl, cycloalkyl and heterocycloalkyl, each of which is optionally substituted with one or more R 15 substituents; or R 2 and R 3 are linked together with the nitrogen to which they are attached to form a saturated heterocyclic group optionally containing one or more additional heteroatoms selected from O, N and S and optionally further substituted by one or more R 16 groups; each R 4 and R 5 is independently selected from H, alkyl, (CH 2) t OR 24 and (CH 2) u NR 25 R 26; or one of R 4 and R 5 is H or alkyl and the other is linked to R 3 to form a saturated heterocyclic group; each R 6 and R 7 is independently selected from H, alkyl, (CH 2) v OR 27 and (CH 2) w NR 28 R 29; or one of R 6 and R 7 is H or alkyl and the other is linked to R 3 to form a saturated heterocyclic group; each R 8 and R 9 is independently selected from H, alkyl, (CH 2) x OR 30 and (CH 2) y NR 31 R 32; or one of R 8 and R 9 is H or alkyl and the other is linked to R 3 to form a saturated heterocyclic group; or one of R 8 or R 9 is linked to one of R 4 or R 5 to form a cyclic group; R 10 is selected from alkyl, OH, halogen, alkoxy, CO 2 -alkyl, COOH, CO-alkyl, NO 2 and CN; each R 14, R 15, R 16 and R 33 is independently selected from (CH 2) s -R 17, R 17 is selected from alkyl, NR 18 R 19, OR 20, SR 21, COR 22 and CO 2 R 23; R 11, R 12 and R 18 -R 32 are each independently selected from H and alkyl; R 13 is alkyl; m, q and r are each independently 0, 1 or 2; p is 0 or 1; such that the sum of m, p, q and r is 0, 1, 2, 3, 4 or 5, preferably 0, 1, 2, 3 or 4; and each of s, t, u, v, w, x, y is independently 0, 1, 2, 3 or 4.