convert to postgres plus start adding unit tests