made the map work with some exceptions that are unhandled (TODO)