Disclosed is an oxadiazole or thiadiazole compound of formula (I) where X is oxygen, L is a covalent bond, Ar1 represents a pyridine-3-yl group and Ar2 represents thienyl, 5-cyano-thien-2-yl, 5-nitro-thien-2-yl or 5-bromothien-2-yl. Examples of compound of formula (I) include: 5-(5-Pyridin-3-yl-[1 ,3,4]oxadiazol-2-yl)-thiophene-2-carbonitrile or 3-(5-[5-Nitro-thiophen-2-yl]-[1 ,3,4]oxadiazol-2-yl)-pyridine. Also disclosed is a pharmaceutical composition comprising a compound of formula (I), the use of a compound of formula (I) in the manufacture of a medicament and the method of treating a non-human animal with a compound of formula (I) to regulate cholinergic receptors for diseases such as sleep disorders pain disorders and addiction.