The invention provides compounds of formula (1), and the pharmaceuticallyacceptable salt thereof, wherein R1,R2, R3, R4, R5a, R5b, R5c, R5d, Q, A, Z, and R7 are as described herein;compositions thereof; and uses thereof for the treatment ofdiabetes and obesity.