handling additional cases of summations