fix main() to use new interactive mode correctly