added kludgy interactive mode in a rush. to do properly once I have the time