added offsetMap function to further address issue #9. It's a bit clunky and breaks on safari. Will look into other solutions