add commit write test and pass it