simplify osm code