refactoring to not require postgresql client on host machine