added some map code