Aah duh! bloody stupid of me. Thanks though! (I left it global as I use the same data elsewhere, and just cleared the array before adding the new data. Works perfectly now.)