refactor argument parsing logic
machine name needs strdup