use std::sort instead of custom sort