updated with pgpass file support