functioning with postgis DB, tbd if this is better...