handle empty pairs and old syntax