replace array with set