implemented array as 1d array, but duplication still exists

....fuck this