refactor maps
fix map directive