working on piping request to psql