modifications for postgree support