added edit and interactive mode