Added function to bucketize variables.