version which takes in a machine