takes it back to previous state