created index write and write_end view