Adjusted to  work with 10^3

The code is adjusted to work with 10^3 data
now it is better