Added calculatePartition procedure. Work in progress.