Commit 2 - Modified determineCentroid function to incorporate the new
formula as proposed by the algo