bug in histogram fixed (unsigned int); max scanrange hardcoded to 25