added interactive mode