quick sort which has error
completed