some destructuring
changed db to pg to prevent some naming conflicts
changed to clojure 1.5.1