Add basic code to Replace machine.py