inspired by: The Trojan Room Coffee Machine (http://www.cl.cam.ac.uk/coffee/coffee.html)