fixed 4 bugs
main of test

only aplly to n * 8 byte lenth file