update before helper

when array is length 1, and count = 0, before helper returns an empty array.