added saving and retrieval of jobs using postgreSQL