added --edit flag