solve problems with map