improved setindex1D and wrote more tests