tutorial pdf from Daniel Kehoe