problem select random elements from an array