private boolean readFiretrap(Element element, int houseNumber) {
		//declare variables
		int x = -1;
		int y = -1;

		//check for non-specified attributes
		NamedNodeMap trapAttr = element.getAttributes();
		for(int i = 0; i < trapAttr.getLength(); i++)
		{
			Node attr = trapAttr.item(i); //get attribute

			//check if attribute is part of specified attributes
			if(!attr.getNodeName().equals("x") && !attr.getNodeName().equals("y"))
			{
				errorFlag = 1;
				errorString = "Unspecified attribute for 'firetrap' in house " + houseNumber + ".";
				return false;
			}
		}

		//set values if attributes are valid
		if(element.getAttribute("x").matches(numReg)) 
			x = Integer.parseInt(element.getAttribute("x"));
		if(element.getAttribute("y").matches(numReg))
			y = Integer.parseInt(element.getAttribute("y"));

		//check for missing required attributes
		if(x < 1 || y < 1)
		{
			errorFlag = 1;
			errorString = "Invalid or missing 'firetrap' attribute in house " + houseNumber + ".";
			return false;
		}

		//if we got here, create firetrap
		if(!houseList.get(houseNumber).createFirettrap(x, y))
		{
			errorFlag = 1;
			errorString = "Could not place 'firetrap' in house " + houseNumber + ".";
			return false;
		}
		return true;
	}