added edge conditions to mapper
Merge pull request #2 from emverh/mapper-cleanup

added edge conditions to mapper