fixed small error in partion