implement sorting. save sorting after task transfer.