added auto sort