fixed search bug: wasn't properly checking if search array already contained object before adding it