still trying to get the queries to work on postgres