further work on more mappers. GainN and Gain P added