found the problem of sort but not resolved yet