need to do this before reverting