go version of the binary reader
convert python version to the simplest version. test R version with different values