killed the bug about no returning surplus when there is only one element.