updating map code and tests