small refactorings using `_list` and `_map` utility functions