added mapping function