added template for custom mapper