Previous version
Conflicts fixed
With Prof's example