added support for decoded attributes to be sorted