Working on double sum problem