refactoring of gibbs distribution - replacing for loop with DenseVector multiplication