reverting back to previous states