adding helper function which reads the scale from a block