move funtion before the `labelize_buckets` one