inplemented restart in interactive mode, add graph checking