added revert function

Need to add more detail and functionality