switched to array from list