Added bubbleSort,pointDistance and isPerfect