map example with custom type