There is provided a calcium receptor modulator comprising a compound of the formula (I): wherein ring A is an optionally substituted 5- to 7-membered ring; ring B is an optionally substituted 5- to 7-membered heterocyclic ring; X1 is CR1, CR1R2, N or NR13; X2 is N or NR3; Y is C, CR4 or N, Z is CR5, CR5R6, N or NR7; Ar is an optionally substituted cyclic group; R is H, an optionally substituted hydrocarbon group, etc.; and <;img id="CUSTOM-CHARACTER-00001" he="3.13mm" wi="8.47mm" file="US20090215746A1-20090827-P00001.TIF" img-content="character" img-format="tif"/>; is a single bond or a double bond; R1, R2, R3, R4, R5, R6, R7 and R13 are independently H, an optionally substituted hydrocarbon group; or a salt thereof or a prodrug thereof. Compounds of the formula (II) and (III): wherein ring A is an optionally substituted 5- to 7-membered ring; Q is C, CR5 or N; R8, R9, R10, R11 and R12 are independently, H, an optionally substituted hydrocarbon group, etc., or a salt thereof are also provided. Also specify X1, R3, R1, Y and X3 in formula (II) and (III) as before.