Removed extraneous N_k from computeWeights