added check for latest revision;
changed revert template;