Added in map method and a test