Index: /bidspace/pom.xml
===================================================================
--- /bidspace/pom.xml	(revision 26)
+++ /bidspace/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>bidspace</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -16,5 +16,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /boa/pom.xml
===================================================================
--- /boa/pom.xml	(revision 26)
+++ /boa/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>boa</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /boa/src/main/java/geniusweb/boa/DefaultBoa.java
===================================================================
--- /boa/src/main/java/geniusweb/boa/DefaultBoa.java	(revision 26)
+++ /boa/src/main/java/geniusweb/boa/DefaultBoa.java	(revision 27)
@@ -2,4 +2,5 @@
 
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
@@ -20,4 +21,5 @@
 import geniusweb.party.Capabilities;
 import geniusweb.party.DefaultParty;
+import geniusweb.profile.utilityspace.LinearAdditive;
 import geniusweb.profileconnection.ProfileConnectionFactory;
 import geniusweb.profileconnection.ProfileInterface;
@@ -52,7 +54,9 @@
 		/*
 		 * At this moment only SAOP is supported by BOA. To support others, the
-		 * components also need to get capabilities
+		 * components also need to get capabilities. FIXME limiting this to
+		 * linearadditive may be overly restrictive #1871
 		 */
-		return new Capabilities(new HashSet<>(Arrays.asList("SAOP")));
+		return new Capabilities(new HashSet<>(Arrays.asList("SAOP")),
+				Collections.singleton(LinearAdditive.class));
 	}
 
Index: /boa/src/main/java/geniusweb/boa/acceptancestrategy/TimeDependentAcceptanceStrategy.java
===================================================================
--- /boa/src/main/java/geniusweb/boa/acceptancestrategy/TimeDependentAcceptanceStrategy.java	(revision 26)
+++ /boa/src/main/java/geniusweb/boa/acceptancestrategy/TimeDependentAcceptanceStrategy.java	(revision 27)
@@ -1,5 +1,3 @@
 package geniusweb.boa.acceptancestrategy;
-
-import java.util.HashMap;
 
 import geniusweb.bidspace.BidsWithUtility;
@@ -50,13 +48,5 @@
 	 */
 	protected Double getE(BoaState state) {
-		HashMap<String, Object> params = state.getSettings().getParameters();
-		Double e = 1d;
-		if (params.containsKey("e")) {
-			e = (Double) params.get("e");
-			if (e < 0 || e > 1)
-				throw new IllegalArgumentException(
-						"e must be in [0,1] but got " + this.e);
-		}
-		return e;
+		return state.getSettings().getParameters().getDouble("e", 1d, 0d, 1d);
 	}
 
@@ -70,13 +60,5 @@
 	 */
 	protected Double getK(BoaState state) {
-		HashMap<String, Object> params = state.getSettings().getParameters();
-		Double k = 0d; // default
-		if (params.containsKey("k")) {
-			k = (Double) params.get("k");
-			if (k < 0 || k > 1)
-				throw new IllegalArgumentException(
-						"k must be in [0,1] but got " + this.e);
-		}
-		return k;
+		return state.getSettings().getParameters().getDouble("k", 0d, 0d, 1d);
 	}
 
@@ -92,9 +74,10 @@
 	 */
 	protected Double getMin(BoaState state) {
-		HashMap<String, Object> params = state.getSettings().getParameters();
-		if (params.containsKey("min")) {
-			return Math.max(0f, Math.min(1f, (Double) params.get("min")));
-		}
-		UtilitySpace profile = (UtilitySpace) state.getProfile();
+		Double val = state.getSettings().getParameters().getDouble("min", null,
+				0d, 1d);
+		if (val != null)
+			return val;
+		// val=null, try the reservation bid
+		LinearAdditive profile = (LinearAdditive) state.getProfile();
 		if (profile.getReservationBid() != null) {
 			return profile.getUtility(profile.getReservationBid())
@@ -114,8 +97,8 @@
 	 */
 	protected Double getMax(BoaState state) {
-		HashMap<String, Object> params = state.getSettings().getParameters();
-		if (params.containsKey("max")) {
-			return Math.max(0f, Math.min(1f, (Double) params.get("max")));
-		}
+		Double val = state.getSettings().getParameters().getDouble("max", null,
+				0d, 1d);
+		if (val != null)
+			return val;
 		UtilitySpace profile = (UtilitySpace) state.getProfile();
 		return getBidspace(profile).getRange().getMax().doubleValue();
Index: /boa/src/main/java/geniusweb/boa/biddingstrategy/TimeDependentBiddingStrategy.java
===================================================================
--- /boa/src/main/java/geniusweb/boa/biddingstrategy/TimeDependentBiddingStrategy.java	(revision 26)
+++ /boa/src/main/java/geniusweb/boa/biddingstrategy/TimeDependentBiddingStrategy.java	(revision 27)
@@ -2,5 +2,4 @@
 
 import java.math.BigDecimal;
-import java.util.HashMap;
 import java.util.List;
 import java.util.concurrent.ThreadLocalRandom;
@@ -93,13 +92,5 @@
 	 */
 	protected Double getE(BoaState state) {
-		HashMap<String, Object> params = state.getSettings().getParameters();
-		Double e = 1d;
-		if (params.containsKey("e")) {
-			e = (Double) params.get("e");
-			if (e < 0 || e > 1)
-				throw new IllegalArgumentException(
-						"e must be in [0,1] but got " + this.e);
-		}
-		return e;
+		return state.getSettings().getParameters().getDouble("e", 1d, 0d, 1d);
 	}
 
@@ -113,13 +104,5 @@
 	 */
 	protected Double getK(BoaState state) {
-		HashMap<String, Object> params = state.getSettings().getParameters();
-		Double k = 0d; // default
-		if (params.containsKey("k")) {
-			k = (Double) params.get("k");
-			if (k < 0 || k > 1)
-				throw new IllegalArgumentException(
-						"k must be in [0,1] but got " + this.e);
-		}
-		return k;
+		return state.getSettings().getParameters().getDouble("k", 0d, 0d, 1d);
 	}
 
@@ -137,8 +120,9 @@
 	 */
 	protected Double getMin(BoaState state) {
-		HashMap<String, Object> params = state.getSettings().getParameters();
-		if (params.containsKey("min")) {
-			return Math.max(0f, Math.min(1f, (Double) params.get("min")));
-		}
+		Double val = state.getSettings().getParameters().getDouble("min", null,
+				0d, 1d);
+		if (val != null)
+			return val;
+		// val=null, try the reservation bid
 		LinearAdditive profile = (LinearAdditive) state.getProfile();
 		if (profile.getReservationBid() != null) {
@@ -161,10 +145,9 @@
 	 */
 	protected Double getMax(BoaState state) {
-		HashMap<String, Object> params = state.getSettings().getParameters();
-		if (params.containsKey("max")) {
-			return Math.max(0f, Math.min(1f, (Double) params.get("max")));
-		}
+		Double val = state.getSettings().getParameters().getDouble("max", null,
+				0d, 1d);
+		if (val != null)
+			return val;
 		return bidSpace.getMax().doubleValue();
-
 	}
 
Index: /boa/src/test/java/geniusweb/boa/acceptancestrategy/TimeDepAccStratTest.java
===================================================================
--- /boa/src/test/java/geniusweb/boa/acceptancestrategy/TimeDepAccStratTest.java	(revision 26)
+++ /boa/src/test/java/geniusweb/boa/acceptancestrategy/TimeDepAccStratTest.java	(revision 27)
@@ -22,4 +22,5 @@
 import geniusweb.progress.Progress;
 import geniusweb.progress.ProgressRounds;
+import geniusweb.references.Parameters;
 
 public class TimeDepAccStratTest {
@@ -37,4 +38,5 @@
 		when(state.getProfile()).thenReturn(linearprofile);
 		when(state.getProgress()).thenReturn(progress);
+		when(settings.getParameters()).thenReturn(new Parameters());
 
 	}
Index: /boa/src/test/java/geniusweb/boa/biddingstrategy/TimeDepBidStratTest.java
===================================================================
--- /boa/src/test/java/geniusweb/boa/biddingstrategy/TimeDepBidStratTest.java	(revision 26)
+++ /boa/src/test/java/geniusweb/boa/biddingstrategy/TimeDepBidStratTest.java	(revision 27)
@@ -22,4 +22,5 @@
 import geniusweb.profile.utilityspace.LinearAdditive;
 import geniusweb.progress.Progress;
+import geniusweb.references.Parameters;
 import tudelft.utilities.immutablelist.FixedList;
 import tudelft.utilities.immutablelist.ImmutableList;
@@ -43,4 +44,5 @@
 	@Before
 	public void before() throws URISyntaxException {
+		when(settings.getParameters()).thenReturn(new Parameters());
 		when(state.getReporter()).thenReturn(new ReportToLogger("test"));
 
Index: /collectparties.sh
===================================================================
--- /collectparties.sh	(revision 26)
+++ /collectparties.sh	(revision 27)
@@ -7,5 +7,5 @@
 rm -rf collectedparties
 mkdir collectedparties
-VERSION=1.5.5
+VERSION=1.5.6
 
 cp "exampleparties/anac2019/agentgg/target/agentgg-${VERSION}-jar-with-dependencies.jar" collectedparties
Index: /events/pom.xml
===================================================================
--- /events/pom.xml	(revision 26)
+++ /events/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>events</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /events/src/main/java/geniusweb/inform/Settings.java
===================================================================
--- /events/src/main/java/geniusweb/inform/Settings.java	(revision 26)
+++ /events/src/main/java/geniusweb/inform/Settings.java	(revision 27)
@@ -88,5 +88,5 @@
 	 *         parameters that can be used by the party.
 	 */
-	public HashMap<String, Object> getParameters() {
+	public Parameters getParameters() {
 		return parameters;
 	}
Index: /exampleparties/anac2019/agentgg/pom.xml
===================================================================
--- /exampleparties/anac2019/agentgg/pom.xml	(revision 26)
+++ /exampleparties/anac2019/agentgg/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties.anac2019</groupId>
 	<artifactId>agentgg</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.6</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/anac2019/agentgg/src/main/java/geniusweb/exampleparties/agentgg/AgentGG.java
===================================================================
--- /exampleparties/anac2019/agentgg/src/main/java/geniusweb/exampleparties/agentgg/AgentGG.java	(revision 26)
+++ /exampleparties/anac2019/agentgg/src/main/java/geniusweb/exampleparties/agentgg/AgentGG.java	(revision 27)
@@ -5,4 +5,5 @@
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -28,4 +29,5 @@
 import geniusweb.party.Capabilities;
 import geniusweb.party.DefaultParty;
+import geniusweb.profile.DefaultPartialOrdering;
 import geniusweb.profile.PartialOrdering;
 import geniusweb.profileconnection.ProfileConnectionFactory;
@@ -106,5 +108,6 @@
 	@Override
 	public Capabilities getCapabilities() {
-		return new Capabilities(new HashSet<>(Arrays.asList("SAOP")));
+		return new Capabilities(new HashSet<>(Arrays.asList("SAOP")),
+				Collections.singleton(DefaultPartialOrdering.class));
 	}
 
Index: /exampleparties/anac2019/winkyagent/pom.xml
===================================================================
--- /exampleparties/anac2019/winkyagent/pom.xml	(revision 26)
+++ /exampleparties/anac2019/winkyagent/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties.anac2019</groupId>
 	<artifactId>winkyagent</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.6</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/anac2019/winkyagent/src/main/java/geniusweb/exampleparties/anac2019/winkyagent/WinkyAgent.java
===================================================================
--- /exampleparties/anac2019/winkyagent/src/main/java/geniusweb/exampleparties/anac2019/winkyagent/WinkyAgent.java	(revision 26)
+++ /exampleparties/anac2019/winkyagent/src/main/java/geniusweb/exampleparties/anac2019/winkyagent/WinkyAgent.java	(revision 27)
@@ -4,4 +4,5 @@
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -31,4 +32,5 @@
 import geniusweb.party.Capabilities;
 import geniusweb.party.DefaultParty;
+import geniusweb.profile.DefaultPartialOrdering;
 import geniusweb.profile.PartialOrdering;
 import geniusweb.profileconnection.ProfileConnectionFactory;
@@ -106,5 +108,6 @@
 	@Override
 	public Capabilities getCapabilities() {
-		return new Capabilities(new HashSet<>(Arrays.asList("SAOP")));
+		return new Capabilities(new HashSet<>(Arrays.asList("SAOP")),
+				Collections.singleton(DefaultPartialOrdering.class));
 	}
 
Index: /exampleparties/boulware/pom.xml
===================================================================
--- /exampleparties/boulware/pom.xml	(revision 26)
+++ /exampleparties/boulware/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>boulware</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/comparebids/pom.xml
===================================================================
--- /exampleparties/comparebids/pom.xml	(revision 26)
+++ /exampleparties/comparebids/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>comparebids</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.6</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/comparebids/src/main/java/geniusweb/exampleparties/comparebids/CompareBids.java
===================================================================
--- /exampleparties/comparebids/src/main/java/geniusweb/exampleparties/comparebids/CompareBids.java	(revision 26)
+++ /exampleparties/comparebids/src/main/java/geniusweb/exampleparties/comparebids/CompareBids.java	(revision 27)
@@ -3,4 +3,5 @@
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.LinkedList;
@@ -66,5 +67,6 @@
 	@Override
 	public Capabilities getCapabilities() {
-		return new Capabilities(new HashSet<>(Arrays.asList("COB")));
+		return new Capabilities(new HashSet<>(Arrays.asList("COB")),
+				Collections.singleton(PartialOrdering.class));
 	}
 
Index: /exampleparties/conceder/pom.xml
===================================================================
--- /exampleparties/conceder/pom.xml	(revision 26)
+++ /exampleparties/conceder/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>conceder</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/hardliner/pom.xml
===================================================================
--- /exampleparties/hardliner/pom.xml	(revision 26)
+++ /exampleparties/hardliner/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>hardliner</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/humangui/pom.xml
===================================================================
--- /exampleparties/humangui/pom.xml	(revision 26)
+++ /exampleparties/humangui/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>humangui</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.6</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/humangui/src/main/java/geniusweb/exampleparties/humangui/HumanGui.java
===================================================================
--- /exampleparties/humangui/src/main/java/geniusweb/exampleparties/humangui/HumanGui.java	(revision 26)
+++ /exampleparties/humangui/src/main/java/geniusweb/exampleparties/humangui/HumanGui.java	(revision 27)
@@ -3,4 +3,5 @@
 import java.awt.BorderLayout;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.logging.Level;
@@ -19,4 +20,5 @@
 import geniusweb.party.DefaultParty;
 import geniusweb.party.Party;
+import geniusweb.profile.Profile;
 import geniusweb.profileconnection.ProfileConnectionFactory;
 import geniusweb.profileconnection.ProfileInterface;
@@ -82,5 +84,6 @@
 	@Override
 	public Capabilities getCapabilities() {
-		return new Capabilities(new HashSet<>(Arrays.asList("SAOP")));
+		return new Capabilities(new HashSet<>(Arrays.asList("SAOP")),
+				Collections.singleton(Profile.class));
 	}
 
Index: /exampleparties/linear/pom.xml
===================================================================
--- /exampleparties/linear/pom.xml	(revision 26)
+++ /exampleparties/linear/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>linear</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/randomparty/pom.xml
===================================================================
--- /exampleparties/randomparty/pom.xml	(revision 26)
+++ /exampleparties/randomparty/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>randomparty</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.6</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/randomparty/src/main/java/geniusweb/exampleparties/randomparty/RandomParty.java
===================================================================
--- /exampleparties/randomparty/src/main/java/geniusweb/exampleparties/randomparty/RandomParty.java	(revision 26)
+++ /exampleparties/randomparty/src/main/java/geniusweb/exampleparties/randomparty/RandomParty.java	(revision 27)
@@ -4,4 +4,5 @@
 import java.math.BigInteger;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Random;
@@ -109,5 +110,6 @@
 	public Capabilities getCapabilities() {
 		return new Capabilities(
-				new HashSet<>(Arrays.asList("SAOP", "AMOP", "MOPAC")));
+				new HashSet<>(Arrays.asList("SAOP", "AMOP", "MOPAC")),
+				Collections.singleton(Profile.class));
 	}
 
Index: /exampleparties/randompartypy/pom.xml
===================================================================
--- /exampleparties/randompartypy/pom.xml	(revision 26)
+++ /exampleparties/randompartypy/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>randompyparty</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/randompartypy/src/main/resources/RandomParty.py
===================================================================
--- /exampleparties/randompartypy/src/main/resources/RandomParty.py	(revision 26)
+++ /exampleparties/randompartypy/src/main/resources/RandomParty.py	(revision 27)
@@ -13,4 +13,5 @@
 import java.util.HashSet as HashSet
 import java.util.Random as Random
+import java.util.Collections as Collections
  
 import geniusweb.actions.Accept as Accept
@@ -65,5 +66,5 @@
 	# Override
 	def getCapabilities(self): # -> Capabilities
-			return Capabilities(HashSet([ "SAOP"]))
+			return Capabilities(HashSet([ "SAOP"]), Collections.singleton(Profile));
 
 	# Override
Index: /exampleparties/simpleboa/pom.xml
===================================================================
--- /exampleparties/simpleboa/pom.xml	(revision 26)
+++ /exampleparties/simpleboa/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>simpleboaparty</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.6</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/simpleshaop/pom.xml
===================================================================
--- /exampleparties/simpleshaop/pom.xml	(revision 26)
+++ /exampleparties/simpleshaop/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>simpleshaop</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.6</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/ShaopParty.java
===================================================================
--- /exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/ShaopParty.java	(revision 26)
+++ /exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/ShaopParty.java	(revision 27)
@@ -5,4 +5,5 @@
 import java.math.BigInteger;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Random;
@@ -24,4 +25,5 @@
 import geniusweb.party.Capabilities;
 import geniusweb.party.DefaultParty;
+import geniusweb.profile.DefaultPartialOrdering;
 import geniusweb.profile.PartialOrdering;
 import geniusweb.profileconnection.ProfileConnectionFactory;
@@ -90,5 +92,6 @@
 	@Override
 	public Capabilities getCapabilities() {
-		return new Capabilities(new HashSet<>(Arrays.asList("SHAOP")));
+		return new Capabilities(new HashSet<>(Arrays.asList("SHAOP")),
+				Collections.singleton(DefaultPartialOrdering.class));
 	}
 
Index: /exampleparties/timedependentparty/pom.xml
===================================================================
--- /exampleparties/timedependentparty/pom.xml	(revision 26)
+++ /exampleparties/timedependentparty/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb.exampleparties</groupId>
 	<artifactId>timedependentparty</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/TimeDependentParty.java
===================================================================
--- /exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/TimeDependentParty.java	(revision 26)
+++ /exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/TimeDependentParty.java	(revision 27)
@@ -6,4 +6,5 @@
 import java.math.RoundingMode;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Random;
@@ -92,5 +93,6 @@
 	@Override
 	public Capabilities getCapabilities() {
-		return new Capabilities(new HashSet<>(Arrays.asList("SAOP", "MOPAC")));
+		return new Capabilities(new HashSet<>(Arrays.asList("SAOP", "MOPAC")),
+				Collections.singleton(LinearAdditive.class));
 	}
 
Index: /issuevalue/pom.xml
===================================================================
--- /issuevalue/pom.xml	(revision 26)
+++ /issuevalue/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>issuevalue</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /opponentmodel/pom.xml
===================================================================
--- /opponentmodel/pom.xml	(revision 26)
+++ /opponentmodel/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>opponentmodel</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /party/pom.xml
===================================================================
--- /party/pom.xml	(revision 26)
+++ /party/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>party</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /party/src/main/java/geniusweb/party/Capabilities.java
===================================================================
--- /party/src/main/java/geniusweb/party/Capabilities.java	(revision 26)
+++ /party/src/main/java/geniusweb/party/Capabilities.java	(revision 27)
@@ -7,4 +7,6 @@
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonProperty;
+
+import geniusweb.profile.Profile;
 
 /**
@@ -17,4 +19,8 @@
 	 */
 	private final Set<String> behaviours;
+	/**
+	 * The profile classes that are supported
+	 */
+	private final Set<Class<? extends Profile>> profiles;
 
 	/**
@@ -23,13 +29,33 @@
 	 */
 	@JsonCreator
-	public Capabilities(@JsonProperty("behaviours") Set<String> behaviours) {
+	public Capabilities(@JsonProperty("behaviours") Set<String> behaviours,
+			@JsonProperty("profiles") Set<Class<? extends Profile>> profiles) {
 		if (behaviours == null) {
 			throw new IllegalArgumentException("behaviours==null");
 		}
+		for (Class<? extends Profile> prof : profiles) {
+			if (!Profile.class.isAssignableFrom(prof))
+				throw new IllegalArgumentException(
+						"profile " + prof + " must be a subclass of Profile");
+		}
 		this.behaviours = behaviours;
+		this.profiles = profiles;
 	}
 
+	/**
+	 * 
+	 * @return the behaviours (protocols) that are supported
+	 */
 	public Set<String> getBehaviours() {
 		return behaviours;
+	}
+
+	/**
+	 * 
+	 * @return the profile classes that are supported
+	 * 
+	 */
+	public Set<Class<? extends Profile>> getProfiles() {
+		return profiles;
 	}
 
Index: /party/src/test/java/geniusweb/party/CapabilitiesTest.java
===================================================================
--- /party/src/test/java/geniusweb/party/CapabilitiesTest.java	(revision 26)
+++ /party/src/test/java/geniusweb/party/CapabilitiesTest.java	(revision 27)
@@ -6,4 +6,5 @@
 import java.net.URISyntaxException;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
@@ -17,4 +18,5 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 
+import geniusweb.profile.utilityspace.LinearAdditive;
 import tudelft.utilities.junit.GeneralTests;
 
@@ -23,12 +25,16 @@
 	private Capabilities capabilities1, capabilities1a, capabilities2,
 			capabilities3;
-	private String asJson = "{\"behaviours\":[\"SAOP\"]}";
+	private String asJson = "{\"behaviours\":[\"SAOP\"],\"profiles\":[\"geniusweb.profile.utilityspace.LinearAdditive\"]}";
 
 	@Before
 	public void before() throws URISyntaxException {
-		capabilities1 = new Capabilities(Sets.newSet("SAOP"));
-		capabilities1a = new Capabilities(Sets.newSet("SAOP"));
-		capabilities2 = new Capabilities(Sets.newSet("SEB"));
-		capabilities3 = new Capabilities(Sets.newSet("SEB", "SAOP"));
+		capabilities1 = new Capabilities(Sets.newSet("SAOP"),
+				Collections.singleton(LinearAdditive.class));
+		capabilities1a = new Capabilities(Sets.newSet("SAOP"),
+				Collections.singleton(LinearAdditive.class));
+		capabilities2 = new Capabilities(Sets.newSet("SEB"),
+				Collections.singleton(LinearAdditive.class));
+		capabilities3 = new Capabilities(Sets.newSet("SEB", "SAOP"),
+				Collections.singleton(LinearAdditive.class));
 	}
 
@@ -48,5 +54,5 @@
 	@Test(expected = IllegalArgumentException.class)
 	public void nullTest() throws URISyntaxException {
-		new Capabilities(null);
+		new Capabilities(null, Collections.singleton(LinearAdditive.class));
 	}
 
Index: /profile/pom.xml
===================================================================
--- /profile/pom.xml	(revision 26)
+++ /profile/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>profile</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /profileconnection/pom.xml
===================================================================
--- /profileconnection/pom.xml	(revision 26)
+++ /profileconnection/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>profileconnection</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /protocol/pom.xml
===================================================================
--- /protocol/pom.xml	(revision 26)
+++ /protocol/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>protocol</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /protocol/src/main/java/geniusweb/protocol/session/mopac/MOPAC.java
===================================================================
--- /protocol/src/main/java/geniusweb/protocol/session/mopac/MOPAC.java	(revision 26)
+++ /protocol/src/main/java/geniusweb/protocol/session/mopac/MOPAC.java	(revision 27)
@@ -4,5 +4,4 @@
 import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 import java.util.Timer;
 import java.util.TimerTask;
@@ -267,9 +266,17 @@
 
 	/**
-	 * Send the {@link Inform} for the curreent phase to all parties and start
-	 * the time-out checker
+	 * Send the {@link Inform} for the current phase to the remaining parties
+	 * and start the time-out checker
 	 */
 	private void startPhase(long now) {
-		broadcastNegotiators(state.getPhase().getInform());
+		Inform info = state.getPhase().getInform();
+		for (PartyId pid : state.getPhase().getPartyStates().getNotYetActed()) {
+			try {
+				connections.get(pid).send(info);
+			} catch (IOException e) {
+				state = state.with(new ProtocolException(
+						"Party seems to have disconnected", pid, e));
+			}
+		}
 		startTimer(1 + state.getPhase().getDeadline() - now);
 	}
@@ -350,18 +357,4 @@
 
 		startPhase(now);
-	}
-
-	/**
-	 * Alternative to {@link ProtocolToPartyConnections#broadcast(Inform)},
-	 * sending only to currently negotiating parties
-	 * 
-	 * @param info the info to broadcast
-	 */
-	private void broadcastNegotiators(Inform info) {
-		Map<PartyId, IOException> errs = connections.broadcast(info);
-		for (PartyId pid : errs.keySet()) {
-			state = state.with(new ProtocolException(
-					"Party seems to have disconnected", pid, errs.get(pid)));
-		}
 	}
 
Index: /pythonadapter/pom.xml
===================================================================
--- /pythonadapter/pom.xml	(revision 26)
+++ /pythonadapter/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>pythonadapter</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /references/pom.xml
===================================================================
--- /references/pom.xml	(revision 26)
+++ /references/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>references</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /references/src/main/java/geniusweb/references/Parameters.java
===================================================================
--- /references/src/main/java/geniusweb/references/Parameters.java	(revision 26)
+++ /references/src/main/java/geniusweb/references/Parameters.java	(revision 27)
@@ -22,9 +22,31 @@
 	@SuppressWarnings("unchecked")
 	public <T> T get(String paramname, Class<T> classType) {
-		if (!containsKey(paramname)
-				|| !(get(paramname).getClass().isInstance(classType)))
-			throw new IllegalArgumentException(" Missing contain a parameter "
+		if (!containsKey(paramname) || !(classType.isInstance(get(paramname))))
+			throw new IllegalArgumentException(" Missing a parameter "
 					+ paramname + " with a " + classType.getName() + " value");
 		return (T) get(paramname);
 	}
+
+	/**
+	 * 
+	 * @param name       the parameter name
+	 * @param defaultval the default value to return if parameter is not
+	 *                   available or not inside the given range. Can be null
+	 * @param min        the minimum value, or null if not applicable
+	 * @param max        the maximum value, or null if not applicable
+	 * @return the double value contained inside the parameter with the given
+	 *         name, or defaultval if the parameter does not exist, does not
+	 *         contain a double, or is outside [min, max].
+	 */
+	public Double getDouble(String name, Double defaultval, Double min,
+			Double max) {
+		if (!containsKey(name) || !(get(name) instanceof Double))
+			return defaultval;
+		Double val = (Double) get(name);
+		if (min != null && val < min)
+			return defaultval;
+		if (max != null && val > max)
+			return defaultval;
+		return val;
+	}
 }
Index: /references/src/test/java/geniusweb/references/ParametersTest.java
===================================================================
--- /references/src/test/java/geniusweb/references/ParametersTest.java	(revision 27)
+++ /references/src/test/java/geniusweb/references/ParametersTest.java	(revision 27)
@@ -0,0 +1,69 @@
+package geniusweb.references;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import tudelft.utilities.junit.GeneralTests;
+
+public class ParametersTest extends GeneralTests<Parameters> {
+
+	private final Parameters params1 = new Parameters();
+	private final Parameters params1a = new Parameters();
+	private final Parameters params2 = new Parameters();
+
+	@Before
+	public void before() {
+		params2.put("a", 1);
+		params2.put("b", 2d);
+	}
+
+	@Override
+	public List<List<Parameters>> getGeneralTestData() {
+		return Arrays.asList(Arrays.asList(params1, params1a),
+				Arrays.asList(params2));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList("\\{\\}", "\\{a=1, b=2.0\\}");
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void getWrongClass() {
+		params2.get("a", String.class);
+	}
+
+	@Test
+	public void getInteger() {
+		assertEquals((Integer) 1, params2.get("a", Integer.class));
+		assertEquals((Double) 2d, params2.get("b", Double.class));
+	}
+
+	@Test
+	public void getDouble() {
+		assertEquals((Double) 2d, params2.getDouble("b", 7d, null, null));
+		assertEquals((Double) 2d, params2.getDouble("b", 7d, 0d, 4d));
+
+		// test outside range
+		assertEquals((Double) 7d, params2.getDouble("b", 7d, 4d, 6d));
+		assertEquals((Double) 7d, params2.getDouble("b", 7d, -2d, 1d));
+
+		// test fallback null
+		assertEquals(null, params2.getDouble("b", null, 4d, 6d));
+
+	}
+
+	@Test
+	public void getDoubleWithErrors() {
+		// a does not contain a double
+		assertEquals((Double) 7d, params2.getDouble("a", 7d, 4d, 6d));
+		// c does not exist
+		assertEquals((Double) 7d, params2.getDouble("c", 7d, 4d, 6d));
+
+	}
+}
Index: /simplerunner/pom.xml
===================================================================
--- /simplerunner/pom.xml	(revision 26)
+++ /simplerunner/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>simplerunner</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /timeline/pom.xml
===================================================================
--- /timeline/pom.xml	(revision 26)
+++ /timeline/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>timeline</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -16,5 +16,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /voting/pom.xml
===================================================================
--- /voting/pom.xml	(revision 26)
+++ /voting/pom.xml	(revision 27)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>voting</artifactId>
-	<version>1.5.5</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.5.6</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.5</geniusweb.version>
+		<geniusweb.version>1.5.6</geniusweb.version>
 	</properties>
 
Index: /voting/src/main/java/geniusweb/voting/CollectedVotes.java
===================================================================
--- /voting/src/main/java/geniusweb/voting/CollectedVotes.java	(revision 26)
+++ /voting/src/main/java/geniusweb/voting/CollectedVotes.java	(revision 27)
@@ -85,10 +85,11 @@
 
 	/**
-	 * @return a hashmap containing the {@link Bid}s and a maximum-sized list of
-	 *         {@link PartyId}s that placed a satisfied vote for that bid.
-	 *         maximum-sized means that there is no larger subset of satisfied
-	 *         votes for that bid. There may be other subsets of equal size for
-	 *         the bid. If there are no agreements at all for a bid, the bid is
-	 *         not placed in the map.
+	 * @return a map containing for each {@link Bid}s a subset of
+	 *         {@link PartyId}s that placed a satisfied vote for that bid, such
+	 *         that the subset has maximum power. Maximum power means that there
+	 *         is no other subset of satisfied votes for that bid with more
+	 *         group power. There may be other subsets of equal power for the
+	 *         bid. If there are no concensus possibilities at all for a bid,
+	 *         the bid is not placed in the map.
 	 */
 	public Map<Bid, Set<PartyId>> getMaxAgreements() {
@@ -128,7 +129,16 @@
 	/**
 	 * 
+	 * @param parties a list of parties
+	 * @return total voting power of the parties
+	 */
+	public Integer getTotalPower(Set<PartyId> parties) {
+		return parties.stream().map(p -> powers.get(p)).reduce(0, Integer::sum);
+	}
+
+	/**
+	 * 
 	 * @param votes a list of all votes for a particular bid. The parties that
 	 *              placed the votes are called 'voters'
-	 * @return a consensusgroup with maximum power, so there is no other
+	 * @return a consensus-group with maximum power, so there is no other
 	 *         consensus group that has more power (but there may be other
 	 *         groups with same power).
@@ -150,11 +160,16 @@
 	/**
 	 * 
-	 * @param votes a set of {@link Votes} for one single {@link Bid}
-	 * @return all the consensus groups. A consensus group is a subset of the
-	 *         votes, for which the conditions holds (the combined power of
-	 *         these parties exceeds all voting conditions) if all these parties
-	 *         as a group are accepting that bid. This algorithm works in
-	 *         exponential space and the outcome may also be exponential in the
-	 *         input size.
+	 * @param votes a set of {@link Votes} for one single {@link Bid}. It is
+	 *              assumed all votes are by different parties.
+	 * @return all subsets sets of parties that create a viable consensus vote.
+	 *         A viable consensus voteset VS is a subset of the votes, such that
+	 *         <ol>
+	 *         <li>|VS| &ge; 2
+	 *         <li>TP = The sum of the powers of the parties in VS
+	 *         <li>forall v in VS: v_minpower &le; TP &le; v_maxpower
+	 *         </ol>
+	 *         Notice that this algorithm works in exponential space
+	 *         (=expensive) and not suited for large numbers of parties. Should
+	 *         work fine for up to 10 parties.
 	 */
 	protected Set<Set<PartyId>> getConsensusGroups(Set<Vote> votes) {
@@ -215,13 +230,4 @@
 		}
 		return min;
-	}
-
-	/**
-	 * 
-	 * @param parties a list of parties
-	 * @return total voting power of the parties
-	 */
-	private Integer getTotalPower(Set<PartyId> parties) {
-		return parties.stream().map(p -> powers.get(p)).reduce(0, Integer::sum);
 	}
 
Index: /voting/src/main/java/geniusweb/voting/votingevaluators/LargestAgreement.java
===================================================================
--- /voting/src/main/java/geniusweb/voting/votingevaluators/LargestAgreement.java	(revision 26)
+++ /voting/src/main/java/geniusweb/voting/votingevaluators/LargestAgreement.java	(revision 27)
@@ -69,7 +69,7 @@
 			return agreement;// none
 
-		// find the best one
-		Bid maxbid = agrees.keySet().stream()
-				.max(Comparator.comparingInt(bid -> agrees.get(bid).size()))
+		// find the one with max group power
+		Bid maxbid = agrees.keySet().stream().max(Comparator
+				.comparingInt(bid -> allVotes.getTotalPower(agrees.get(bid))))
 				.get();
 		agreement = agreement.with(new Agreements(maxbid, agrees.get(maxbid)));
Index: /voting/src/main/java/geniusweb/voting/votingevaluators/LargestAgreementsLoop.java
===================================================================
--- /voting/src/main/java/geniusweb/voting/votingevaluators/LargestAgreementsLoop.java	(revision 26)
+++ /voting/src/main/java/geniusweb/voting/votingevaluators/LargestAgreementsLoop.java	(revision 27)
@@ -77,7 +77,8 @@
 			if (agrees.isEmpty())
 				break;
-			// find the best one
+			// find the bid with max group power
 			Bid maxbid = agrees.keySet().stream()
-					.max(Comparator.comparingInt(bid -> agrees.get(bid).size()))
+					.max(Comparator.comparingInt(
+							bid -> allVotes.getTotalPower(agrees.get(bid))))
 					.get();
 			Set<PartyId> maxparties = agrees.get(maxbid);
Index: /voting/src/test/java/geniusweb/voting/votingevaluators/LargestAgreementTest.java
===================================================================
--- /voting/src/test/java/geniusweb/voting/votingevaluators/LargestAgreementTest.java	(revision 26)
+++ /voting/src/test/java/geniusweb/voting/votingevaluators/LargestAgreementTest.java	(revision 27)
@@ -7,4 +7,5 @@
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.List;
 
@@ -15,5 +16,8 @@
 
 import geniusweb.actions.PartyId;
+import geniusweb.actions.Vote;
 import geniusweb.actions.Votes;
+import geniusweb.inform.Agreements;
+import geniusweb.issuevalue.Bid;
 import geniusweb.voting.CollectedVotes;
 import geniusweb.voting.VotingEvaluator;
@@ -26,4 +30,7 @@
 	private LargestAgreement lal1a = new LargestAgreement();
 	private PartyId party1 = new PartyId("party1");
+	private PartyId party2 = new PartyId("party2");
+	private PartyId party3 = new PartyId("party3");
+	private PartyId party4 = new PartyId("party4");
 	private Votes votes1 = mock(Votes.class);
 	private LargestAgreement lal2 = new LargestAgreement(
@@ -58,3 +65,37 @@
 	}
 
+	@Test
+	public void testCollectVotes() {
+		// we set up a tricky situation where party4 has much more power
+		// and therefore party 1+4 >> p1+2+3
+		Bid bid1 = mock(Bid.class);
+		Bid bid2 = mock(Bid.class);
+
+		CollectedVotes votes = new CollectedVotes(Collections.emptyMap(),
+				Collections.emptyMap());
+		votes = votes.with(new Votes(party1,
+				new HashSet<>(Arrays.asList(new Vote(party1, bid1, 1, 99),
+						new Vote(party1, bid2, 1, 99)))),
+				1);
+		votes = votes.with(
+				new Votes(party2,
+						new HashSet<>(
+								Arrays.asList(new Vote(party2, bid1, 1, 99)))),
+				1);
+		votes = votes.with(
+				new Votes(party3,
+						new HashSet<>(
+								Arrays.asList(new Vote(party3, bid1, 1, 99)))),
+				1);
+		votes = votes.with(
+				new Votes(party4,
+						new HashSet<>(
+								Arrays.asList(new Vote(party4, bid2, 1, 99)))),
+				4);
+		LargestAgreement la = new LargestAgreement(votes);
+		Agreements agreement = la.collectVotes();
+		assertEquals(new HashSet<PartyId>(Arrays.asList(party1, party4)),
+				agreement.getMap().keySet());
+	}
+
 }
