Optimization

optimization of map generator