The present invention provides a method of treating ocular hypertension or glaucoma which comprises administering to an animal having ocular hypertension or glaucoma therapeutically effective amount of a compound represented by the general formula I;wherein X, Y, Z, D and R3 are as defined in the specification.