updated orderby clause