add pg database for production
refactor getJSON call into function