adjusting to get correct sum