added current_bucket_idx() function and docs