A compound for use in a method of increasing the lifetime of red blood cells (RBCs) in a pyruvate kinase deficiency patient in need thereof comprising contacting blood with an effective amount of a compound of formula I or a pharmaceutically acceptable salt thereof; or a pharmaceutically acceptable composition comprising a compound of formula I or a pharmaceutically acceptable salt thereof, and a pharmaceutically acceptable carrier, wherein pyruvate kinase deficiency is a deficiency of pyruvate kinase R, wherein: W, X, Y and Z are each independently selected from CH or N; D and D 1 are independently selected from a bond or NR b; A is optionally substituted aryl or optionally substituted heteroaryl; L is a bond, -C, -(CR c R c) m -, -OC -, -(CR c R c) m -OC -, -(CR c R c) m - C -, - NR b C -, or -NR b C - (wherein the point of the attachment to R 1 is on the lefthand side); R 1 is selected from alkyl, cycloalkyl, aryl, heteroaryl, and heterocyclyl; each of which is substituted with 0-5 occurrences of R d; each R 3 is independently selected from halo, haloalkyl, alkyl, hydroxyl and -OR a, or two adjacent R 3 taken together with the carbon atoms to which they are attached form an optionally substituted heterocyclyl; each R a is independently selected from alkyl, acyl, hydroxyalkyl and haloalkyl; each R b is independently selected from hydrogen and alkyl; each R c is independently selected from hydrogen, halo, alkyl, alkoxy and halo alkoxy or two R c taken together with the carbon atoms to which they are attached form an optionally substituted cycloalkyl; each R d is independently selected from halo, haloalkyl, haloalkoxy, alkyl, alkynyl, nitro, cyano, hydroxyl, -C R a, -OC R a, -C OR a, -SR a, -NR a R b and -OR a, or two R d taken together with the carbon atoms to which they are attached form an optionally substituted heterocyclyl; n is 0, 1, or 2; m is 1, 2 or 3; h is 0, 1, 2; and g is 0, 1 or 2. W, X, Y and Z are each independently selected from CH or N; D and D 1 are independently selected from a bond or NR b; A is optionally substituted aryl or optionally substituted heteroaryl; L is a bond, -C, -(CR c R c) m -, -OC -, -(CR c R c) m -OC -, -(CR c R c) m - C -, - NR b C -, or -NR b C - (wherein the point of the attachment to R 1 is on the lefthand side); R 1 is selected from alkyl, cycloalkyl, aryl, heteroaryl, and heterocyclyl; each of which is substituted with 0-5 occurrences of R d; each R 3 is independently selected from halo, haloalkyl, alkyl, hydroxyl and -OR a, or two adjacent R 3 taken together with the carbon atoms to which they are attached form an optionally substituted heterocyclyl; each R a is independently selected from alkyl, acyl, hydroxyalkyl and haloalkyl; each R b is independently selected from hydrogen and alkyl; each R c is independently selected from hydrogen, halo, alkyl, alkoxy and halo alkoxy or two R c taken together with the carbon atoms to which they are attached form an optionally substituted cycloalkyl; each R d is independently selected from halo, haloalkyl, haloalkoxy, alkyl, alkynyl, nitro, cyano, hydroxyl, -C R a, -OC R a, -C OR a, -SR a, -NR a R b and -OR a, or two R d taken together with the carbon atoms to which they are attached form an optionally substituted heterocyclyl; n is 0, 1, or 2; m is 1, 2 or 3; h is 0, 1, 2; and g is 0, 1 or 2.