added sortsam