primarily intending to integrate Colin Walter's O(N) map code and