add len method
add support for nil as a valid entry
add more tests
use interface for the mapping
doc