converted legacy code to liquid/3.x database interface
converted legacy code to liquid/3.x database interface