refactored target machine creation