script and function to place feature values in discrete buckets