added clearing of buckets