use bool[] for building matches