VL6180 sensor values bouncing

Hi eveyrone. I'm working on a prototype and I'm using the VL6180 sensor (https://www.sparkfun.com/products/12785).

I have only the sensor and the arduino mega 2560 connected right now .

I'm connecting the sensor to the SDA and SCL lines, but my values for the distance keep bouncing.

For e.g: if my sensor is 2 c.m from the surface, the values are as follows: 18,16,23,21,20,19,22 ...

Things I tried:

I tried using pull-up resistors(4k7) on the SDA and SCL lines, and also decoupling capacitors of 0.1 uF, but the values are still bouncing.

I tried the example codes from the 3 different libraries available but it's still not working.

I checked the voltages on the power(4.98V),SDA(>4.84 V varying), SCL(>4.8V varying)

I need the values to have a maximum offset of 1mm for my calculations to work out right.

Any help would be greatly appreciated

take a look at top of page 35 of this datasheet sensor details