Change end values from double to int (because of noise)