add aftermap() extension function to auto mapper codes