A compound of formula (I): ** Formula ** wherein: A is C6-10 aryl or 5-10 membered heteroaryl; X1 is CR1 or N; R1 is selected from the group consisting of H, C1-25 alkyl6, C1-6 haloalkyl, -NRaRb, halogen, -CN and -ORa; R2 is selected from the group consisting of H, hydroxyl, C1-6 alkyl, C1-6 heteroalkyl, -NRaRb, halogen, -C (O) Ra, -C (O) ORa, -C (O) NRaRb, -OC (O) NRaRb, -NRaC (O) Rb, -NRaC (O) ORb, -S (O) 0-2RC, -S (O) 2NRaRb, - NRaS (O) 2Rb, C6-10 aryl, C3- cycloalkyl 10, 5-10 membered heteroaryl, 3-12 membered heterocyclyl and -O-R5, wherein each C1-6 alkyl, C1-6 heteroalkyl, C6-10 aryl, C3-10 cycloalkyl, 5 of 10 membered heteroaryl and the 3 to 12 membered heterocyclyl are optionally substituted with one to five R20 groups; or R1 and R2 are taken together to form a fused C6 aryl, 5-6 membered heteroaryl, 5-6 membered heterocyclyl or C5-6 cycloalkyl, each of which is optionally substituted with one to five R20 groups; R3 is selected from the group consisting of H, C1-6 alkyl, C1-6 heteroalkyl, -NRaRb, halogen, -C (O) Ra, -C (O) ORa, -C (O) NRaRb, -OC (O ) NRaRb, -NRaC (O) Rb, -NRaC (O) ORb, -S (O) 0-2RC, -S (O) (Rc) = NRb, -S (O) 2F, - S (O) 2NRaRb , -NRaS (O) 2Rb, -N3, -CN, -NO2, -ORa, C6-10 aryl, C3-10 cycloalkyl, 5-10 membered heteroaryl and 3-12 membered heterocyclyl, wherein each C1- alkyl 6, C1-6 heteroalkyl, C6-10 aryl, C3-10 cycloalkyl, 5-10 heteroaryl members and 3-12 heterocyclyl members is optionally substituted with one to five R20 groups; each R4 is independently selected from the group consisting of H, C1-6 alkyl, C1-6 heteroalkyl, C1-6 haloalkyl, C1-6 hydroxyalkyl, C2-6 alkenyl, C2-6 alkynyl, C6-10 aryl, C3- cycloalkyl 10, 5-10 membered heteroaryl, 3-12 membered heterocyclyl, -NRaRb, halogen, -C (O) Ra, -C (O) ORa, -C (O) NRARB, -OC (O) NRaRb, - NRaC (O) Rb, -NRaC (O) ORb, -S (O) 0-2RC, -S (O) 2NRaRb, -NRaS (O) 2Rb, -N3, -CN, -NO2 and -ORa, where each C1-6 alkyl, C1-6 heteroalkyl, C6-10 aryl, C3-10 cycloalkyl, 5-10 membered heteroaryl and 3-12 mem