More work on setting up the gibbs minimization problem