remove extraneous code from mapper