Make matching more efficient