optimize some map:s