change to static map
fix minor bugs