reformateed code. test marks unmarked found 1's