Changed calcSums() so that there is no output in this function