added machine choice option to testing code.