converting and scanning raw values - tests and some fixes