switch from qSort to std::sort