Optimize mapper method