simple finding subarray, will be reimplementing as regex later on