changed database from sql to pg