Adding a mapping function