not perfect. committing before crash