added careful error checking to rev control