updates with alan's feedback re: no  var inside #sum