move scale reading to own function.