faster implementation of osm module