improved has method. now looking for values in array