Thanks @thisch for the feedback. Actually, the proposed code for `ordering()` works and looks better. So I am replacing the current code with this.