additional utils for pairs and functions