refactoring: simpler list_processes()