add checking for the right number of pairs and also match sequence name