All bug fixed. Partition tolerance added.