read value correctly