add tests and map example