adding postgres functionality