more performance improvements in map