added some map magic