implement sorting by using mode 4
set default sorting
handle sorting for import and export