application connects to postgres database