moved the write test to index