public void addEntry(Map<String, String> data,String tag){
		/**
		 * addEntry: add tracks info into the json database file
		 * tag - String: This is a searchable string which should be
		 * unique and be used to identify this entry.
		 * data - Map<String,String>: This should contain key/value pairs
		 * of the data to be added to database.
		 */
		JsonObjectBuilder copyInto= null;
		JsonObjectBuilder returnedObject = null;
		JsonObjectBuilder mainBuilder = Json.createObjectBuilder();
		try {
			copyInto = Json.createObjectBuilder();
			FileReader fr = new FileReader(dbLocation);
			JsonReader reader = Json.createReader(fr);
			JsonStructure jsonst =  reader.read();
			switch(jsonst.getValueType()){
			case OBJECT:
				JsonObject obj = (JsonObject) jsonst;
				for(String name: obj.keySet()){
					//nothing is done with the null in first iteration
					//because the first expected value is an Object.
					returnedObject = rewriteJson(copyInto,jsonst,null);
					mainBuilder.add(name, returnedObject.build());
				}

			default:
				System.out.println("Default");
				break;
			}
		} catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (javax.json.stream.JsonParsingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		JsonObjectBuilder obj = Json.createObjectBuilder();
		JsonObject object = mapToJsonObject(data.keySet().iterator(),obj,data);
		System.out.println(object.toString());
		mainBuilder.add(tag,object);
		try {
			FileWriter fl = new FileWriter(dbLocation);
			JsonWriter jWriter = Json.createWriter(fl);
			jWriter.writeObject(mainBuilder.build());
			fl.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		nextID++;

	}