add to array method