working on moving to ORM using postgres