add units to scandata
add units to scandata, better initialization of scandata
better initialization from scandata