The present invention relates to compounds of formula (I), including their stereoisomers and pharmaceutically acceptable salts. This invention also relates to methods of making such compounds and pharmaceutical compositions comprising such compounds. The compounds of this invention are useful in the treatment of various disorders that are related to 5-hydroxytryptamine 4 (5-HT4) receptor.