Added the mapping function