diff --git a/src/1_einstein_model.md b/src/1_einstein_model.md
index 47fc5e4518b25844704abb58b003555cd24bad35..40729e5659f3fda9c4122f49361977c8b59d64e1 100644
--- a/src/1_einstein_model.md
+++ b/src/1_einstein_model.md
@@ -5,7 +5,7 @@ jupyter:
       extension: .md
       format_name: markdown
       format_version: '1.0'
-      jupytext_version: 0.8.6
+      jupytext_version: 1.0.2
   kernelspec:
     display_name: Python 3
     language: python
diff --git a/src/9_crystal_structure.md b/src/9_crystal_structure.md
index 00cfe7f847fa721a54f9526e0b97e7a3b25563eb..c270d868002976c3726c807a06b128882fa8b71b 100644
--- a/src/9_crystal_structure.md
+++ b/src/9_crystal_structure.md
@@ -5,7 +5,7 @@ jupyter:
       extension: .md
       format_name: markdown
       format_version: '1.0'
-      jupytext_version: 0.8.6
+      jupytext_version: 1.0.2
   kernelspec:
     display_name: Python 3
     language: python
@@ -19,6 +19,9 @@ import numpy as np
 
 from common import draw_classic_axes, configure_plotting
 
+import plotly.plotly as py
+import plotly.graph_objs as go
+
 configure_plotting()
 ```
 
@@ -144,32 +147,154 @@ plt.plot(x+1,y+1, 'o', markerfacecolor='none', markeredgecolor='k', markersize=1
 1. What is the definition of a primitive unit cell? Sketch a Wigner-Seitz unit cell and two other possible primitive unit cells of the crystal. 
 2. If the distance between the filled cirles is $a=0.28$ nm, what is the volume of the primitive unit cell? How would this volume change if all the empty circles and the filled circles were identical?
 3. Write down one set of primitive lattice vectors and the basis for this crystal.
-4. Imagine expanding the lattice into the perpendicular direction $z$. We can define a new three-dimensional crystal by considering a periodic structure in the $z$ direction, where the filled circles have been displaced by $\frac{a}{2}$ from the empty circles.
-
-    The following illustration shows the new arrangement of the atoms, with the numbers indicating the height of the atom as fraction of $a$. The unlableled points are at $z=0,1$. 
-
-    ![](figures/cubic_3D.svg)
+4. Imagine expanding the lattice into the perpendicular direction $z$. We can define a new three-dimensional crystal by considering a periodic structure in the $z$ direction, where the filled circles have been displaced by $\frac{a}{2}$ from the empty circles. The following figure shows the new arrangement of the atoms. What lattice do we obtain? Write down the basis of the three-dimensional crystal and give an example of this type of crystal. 
 
-    ??? info "source"
-
-        "The Oxford Solid State Basics" by S.Simon
-
-    What lattice do we obtain? Write down the basis of the three-dimensional crystal and give an example of this type of crystal. 
+```python
+x = np.tile(np.arange(0,2,1),4)
+y = np.repeat(np.arange(0,2,1),4)
+z = np.tile(np.repeat(np.arange(0,2,1),2),2)
+
+trace1 = go.Scatter3d(
+    x = x,
+    y = y,
+    z = z,
+    mode = 'markers',
+    marker = dict(
+        sizemode = 'diameter',
+        sizeref = 20,
+        size = 20,
+        color = 'rgb(255, 255, 255)',
+        line = dict(
+          color = 'rgb(0,0,0)',
+          width = 5
+        )
+        )
+)
+
+trace2 = go.Scatter3d(
+    x = [0.5],
+    y = [0.5],
+    z = [0.5],
+    mode = 'markers',
+    marker = dict(
+        sizemode = 'diameter',
+        sizeref = 20,
+        size = 20,
+        color = 'rgb(0,0,0)',
+        line = dict(
+          color = 'rgb(0,0,0)',
+          width = 5
+        )
+        )
+)
+
+data=[trace1, trace2]
+
+layout=go.Layout(showlegend = False,
+                scene = dict(
+                        xaxis=dict(
+                        title= 'x(a)',
+                        ticks='',
+                        showticklabels=False
+                        ),
+                        yaxis=dict(
+                        title= 'y(a)',
+                        ticks='',
+                        showticklabels=False
+                        ),
+                        zaxis=dict(
+                        title= 'z(a)',
+                        ticks='',
+                        showticklabels=False
+                        )
+                    ))
+
+
+fig=go.Figure(data=data, layout=layout)
+py.iplot(fig, filename='Cubic_3D')
+```
 
 5. If we consider all atoms to be the same, what lattice do we obtain? Give an example of this type of crystal.
 6. Compute the filling factor of the three-dimensional crystal. Choose the radius of the atoms to be such that the nearest neighbouring atoms just touch.
 
 ### Exercise 2: Diamond lattice
 
-Consider a the [diamond crystal structure](https://en.wikipedia.org/wiki/Diamond_cubic) structure. The following illustration shows the arrangement of the carbon atoms in a conventional unit cell, with the numbers indicating the height of the atom above the base of the cube as a fraction of the cell dimension. The unlableled points are at $z=0,1$. 
-
-![](figures/diamond.svg)
-
-??? info "source"
+Consider a the [diamond crystal structure](https://en.wikipedia.org/wiki/Diamond_cubic) structure. The following illustration shows the arrangement of the carbon atoms in a conventional unit cell.
 
-    "The Oxford Solid State Basics" by S.Simon
+```python
+x = np.tile(np.arange(0,2,1),4)
+y = np.repeat(np.arange(0,2,1),4)
+z = np.tile(np.repeat(np.arange(0,2,1),2),2)
+
+x = np.hstack((x, x, x+0.5, x+0.5))
+y = np.hstack((y, y+0.5, y+0.5, y))
+z = np.hstack((z, z+0.5, z, z+0.5))
+
+
+trace1 = go.Scatter3d(
+    x = x,
+    y = y,
+    z = z,
+    mode = 'markers',
+    marker = dict(
+        sizemode = 'diameter',
+        sizeref = 20,
+        size = 20,
+        color = 'rgb(200, 200, 200)',
+        line = dict(
+          color = 'rgb(0,0,0)',
+          width = 5
+        )
+        )
+)
+
+trace2 = go.Scatter3d(
+    x = x+1/4,
+    y = y+1/4,
+    z = z+1/4,
+    mode = 'markers',
+    marker = dict(
+        sizemode = 'diameter',
+        sizeref = 20,
+        size = 20,
+        color = 'rgb(200, 200, 200)',
+        line = dict(
+          color = 'rgb(0,0,0)',
+          width = 5
+        )
+        )
+)
+
+
+data = [trace1, trace2]
+layout=go.Layout(showlegend = False,
+                scene = dict(
+                        xaxis=dict(
+                        title= 'x(a)',
+                        range= [0,1],
+                        ticks='',
+                        showticklabels=False
+                        ),
+                        yaxis=dict(
+                        title= 'y(a)',
+                        range= [0,1],
+                        ticks='',
+                        showticklabels=False
+                        ),
+                        zaxis=dict(
+                        title= 'z(a)',
+                        range= [0,1],
+                        ticks='',
+                        showticklabels=False
+                        )
+                    ))
+
+
+fig=go.Figure(data=data, layout=layout)
+py.iplot(fig, filename='Diamond')
+```
 
-The side of the cube is $0.3567$ nm. 
+The side of the cube is $ a = 0.3567$ nm. 
 
 1. How is this crystal structure related to the fcc lattice? Compute the basis and one set of primitive lattice vectors.
 2. Determine the number of atoms in the primitive unit cell and compute its volume. 
diff --git a/src/common.py b/src/common.py
new file mode 120000
index 0000000000000000000000000000000000000000..bcd97a13f9303602b1b58476ffd4df78e681b8cf
--- /dev/null
+++ b/src/common.py
@@ -0,0 +1 @@
+../code/common.py
\ No newline at end of file