change interval to bucketSize