Adam's machine interface code