public Map<String, Mass> makeMassMap(){

		Map<String, Mass> massMap = new HashMap<String, Mass>();
		NodeList[] massArray = {movingMasses, fixedMasses};

		for (NodeList massType: massArray){
			for (int i = 0; i < massType.getLength(); i++) {
				Node node = massType.item(i);

				if (node.getNodeType() == Node.ELEMENT_NODE) {
					Element element = (Element) node;

					String id = element.getAttribute("id");
					double x = Double.parseDouble(element.getAttribute("x"));
					double y = Double.parseDouble(element.getAttribute("x"));
					double vx = getVelocity(element, "vx");
					double vy = getVelocity(element, "vy");
					double m;
					if (element.getAttribute("mass").equals(""))
						m = 1.0;
					else
						m = Double.parseDouble(element.getAttribute("mass"));

					if (element.getNodeName().equals("mass")){
						Mass moveableMass = new MoveableMass(id, 1, 5, x, y, vx, vy, m, mMassColor);
						massMap.put(id, moveableMass);
					}

					else{
						Mass fixedMass = new FixedMass(id, 0, 5, x, y, 1, fMassColor);
						massMap.put(id, fixedMass);
					}
				}
			}
		}

		return massMap;

	}