public static Model loadModel (File f, boolean textured) throws FileNotFoundException, IOException{
		BufferedReader reader = new BufferedReader(new FileReader(f));
		Model m = new Model();
		String line;
		
		while ((line = reader.readLine()) != null){
			// Import vertices from .obj file
			if (line.startsWith("v ")){
				float x = Float.valueOf(line.split(" ")[1]);
				float y = Float.valueOf(line.split(" ")[2]);
				float z = Float.valueOf(line.split(" ")[3]);
				m.vertices.add(new Vector3f(x, y, z));
			}
			// importing texture coordinates
			else if (line.startsWith("vt ")){
				float x = Float.valueOf(line.split(" ")[1]);
				float y = Float.valueOf(line.split(" ")[2]);
				m.textureCoordinates.add(new Vector2f(x, y));
			}
			// importing normals (the normals are set in blender before exporting the .obj - smooth shading or not)
			else if (line.startsWith("vn ")){
				float x = Float.valueOf(line.split(" ")[1]);
				float y = Float.valueOf(line.split(" ")[2]);
				float z = Float.valueOf(line.split(" ")[3]);
				m.normals.add(new Vector3f(x, y, z));
			}
			// adding the vertices and normals to each face
			else if (line.startsWith("f ")){
				// each face line is split into 3 sets of 3 numbers
				// vertices are the first number
				Vector3f vertexIndices = new Vector3f(
						Float.valueOf(line.split(" ")[1].split("/")[0]), 
						Float.valueOf(line.split(" ")[2].split("/")[0]),
						Float.valueOf(line.split(" ")[3].split("/")[0]));
				// vn (normals) are the third number
				Vector3f normalIndices = new Vector3f(
						Float.valueOf(line.split(" ")[1].split("/")[2]), 
						Float.valueOf(line.split(" ")[2].split("/")[2]),
						Float.valueOf(line.split(" ")[3].split("/")[2]));
				// vt (texture vertices) are the second number
				if (textured){
					Vector3f uvIndices = new Vector3f(
						Float.valueOf(line.split(" ")[1].split("/")[1]), 
						Float.valueOf(line.split(" ")[2].split("/")[1]),
						Float.valueOf(line.split(" ")[3].split("/")[1]));
					m.faces.add(new Face(vertexIndices, uvIndices, normalIndices));
				} else {
					m.faces.add(new Face(vertexIndices, normalIndices));
				}
			}
		}
		reader.close();
		return m;
	}