fix bad substitution error
add basic test cases for map