make it possible to provide edit token directly
fixed rather huge bug in revert query