diff --git a/src/main/java/org/jamesframework/core/problems/solutions/SubsetSolution.java b/src/main/java/org/jamesframework/core/problems/solutions/SubsetSolution.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jamesframework/core/problems/solutions/SubsetSolution.java
+++ b/src/main/java/org/jamesframework/core/problems/solutions/SubsetSolution.java
@@ -268,16 +268,21 @@ public class SubsetSolution extends Solution {
         return hash;    
     }
     
+    /**
+     * Creates a nicely formatted, human readable string containing the selected IDs.
+     * 
+     * @return formatted string
+     */
     @Override
     public String toString(){
         StringBuilder str = new StringBuilder();
         str.append("SubsetSolution: {");
-        // add selected IDs
-        for(int ID : selected){
-            str.append(ID).append(", ");
-        }
-        // remove final comma and space if nonzero number of selected IDs
+        // add selected IDs, if any
         if(getNumSelectedIDs() > 0){
+            for(int ID : selected){
+                str.append(ID).append(", ");
+            }
+            // remove final comma and space
             str.delete(str.length()-2, str.length());
         }
         // close brackets
updated toString of subset solution