updated queries in borr-dbfuncs.R to match new version of database