public static PathwayElement createGroup(
			String groupRef, String graphRef,
			String type) {
		
		// create group element
		MGroup pwElt = (MGroup) PathwayElement.createPathwayElement(ObjectType.GROUP);

		// set ids
		pwElt.setGroupId(groupRef);
		pwElt.setGraphId(graphRef);
		
		// style type
		if (type.toLowerCase() == "complex") {
			GroupStyle gs = GroupStyle.COMPLEX;
			pwElt.setGroupStyle(gs);
		} else if  (type.toLowerCase() == "group") {
			GroupStyle gs = GroupStyle.GROUP;
			pwElt.setGroupStyle(gs);
		} else {}
				
		return pwElt;
	}