update before sleep update truncate