added an interactive mode