adding mapping function