add sort stability algorithm