move map init to common helper and function
solve conflict
fix map bug