fixed tests, migrated to postgres