mapping function adjusted, finally closes issue #1