this invention relates to compounds of the formula : or a pharmaceutically acceptable salt thereof , wherein : a , r 1 , r 2 , r 3 , r 4 and r 5 are each as described herein or a pharmaceutically acceptable salt , and compositions containing such compounds and the use of such compounds in the treatment of a condition mediated by 5 - ht 4 agonistic activity such as , but not limited to , as gastroesophageal reflux disease , gastrointestinal disease , gastric motility disorder , non - ulcer dyspepsia , functional dyspepsia , irritable bowel syndrome , constipation , dyspepsia , esophagitis , gastroesophageal disease , nausea , central nervous system disease , alzheimer &# 39 ; s disease , cognitive disorder , emesis , migraine , neurological disease , pain , cardiovascular disorders , cardiac failure , heart arrhythmia , diabetes or apnea syndrome .